a.What is unit testing, how is it implemented, and why is it important?
Unit Testing tests the health of a function. The function is expected to return a value dependent on conditions, such as arguments passed to it. However, the function's result may also be dependent on the state of other functions/objects, since high coupling is not always avoidable. These conditions would be set before the function in question is called, and the expected result is verified. Each combination should be tested for the expected result. Unit testing is important to assure and document that a function is correct. If the function is dependent on the state of other objects, changes to these objects may affect the function. Therefore, even when new revisions are not made to the function directly, it is still important to run unit tests in order to document it was not affected by other locations. Unit Testing avoids errors being passed to the next stage of development, where fixing defects are more costly.
b.What is functional testing, how is it implemented, and why is it important?
Functional Testing is testing from a business or user perspective. The application is tested as if a user was controlling it to obtain some type of user or business goal. Functional Requirements are set that document these goals. Each requirement should be tested for positive and negative testing. The functionality should succeed perfectly and fail gracefully; as expected. Functional Requirement is important for the same reasons as unit testing. However, there is more of an emphasis on assuring that the user and/or business needs are met by the application before deployment. This is why the preferred testing is from the viewpoint of the user. Not only will this save the cost of fixing a defect further down the development lifecycle, but it will also keep the user/customer from being negatively affected by the defect, thus saving the customer relationship from the development firm.
c.What is the significance and usage of automated unit testing in software development?
Without automated unit testing, a developer will test his or her function by running commands through a console or invoking it through another function; all while using a debugger. This tedious task can lead to loss of precision during testing. Furthermore, without proper documentation, many conditions can fall between the cracks, if the developer forget to test it. Furthermore, when a project has too much time constraint, unit testing is sacrificed by only testing conditions that are perceivied to be crucial. -Thus, there are still many untested conditions that could be broken. By automating the testing process, many conditions that were originally perceivied to be edge cases, can now be tested regardless of time constraints. This is the optimal way to maxamize test coverage. Automation can also be done for Functional Testing; which can also suffer from the same implications from time constrained projects.
d.Where would you commonly find automated unit testing implemented? Can you find any documentation online that describes this and post a link to it?
You would find automated unit testing implemented in some type of language tool kit. For example you might use Rspec for unit testing ruby. -Or, you might use Jasmine for javascript. This frameworks each have their own functions and setup for asserting that a function returns or behaves correctly. I full list of Unit Testing implementation with links to their documentation can be found at: http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks
e. What is test driven development and how can it improve the management and quality of software projects.
Test Driven Development is done when a developer writes an automated unit test case before he even writes the function. The test is run and failed, since code has yet to be written. The automated unit test will test for all possible conditions. Testing is done initially to avoid a developer from settling for a function of less quality. By forcing the developer to write code that matches a pre-designed test case, quality is also forced to be met. The function is continued to be coded until the Test Case finally passes. Once the function passes the process is almost complete. The developer can now refactor the code for better readability. Since the code originally passed before this last process, any new changes tha lead to failing can be blamed on the new code and not the automated test case. -Thus, allowing for continued high quality code. Functional and Design Requirements are done before coding for one main reason: to avoid settling for a less quality product, once the stress of a project begins to influence decisions. For the same reason so should Test Cases and Automation.