Unit Testing
Integration Testing
System Testing
Acceptance Testing |
Unit Testing
validate that the code is doing things right(What?)Units - the smallest testable part of an application
In Procedural Design a unit can be an individual program, function, procedure,
web page, menu etc
In Object Oriented Design a unit is a Class
(Who?)Conducted by the developer who created the unit
Each
test confirms that a method produces the expected output when given a known input
(When?)Begins once unit development is complete
Each unit is tested separately before integrating them into modules
Write unit tests before you write the code they will test (eXP)
(How?)Pretend that the class you are writing the test for exists.
Write the test (by using a unit-testing framework) - define the interface that the class will implement
It will be a lot of syntax errors (because the class does not exist yet), but stay with it.
Run your unit tests
Fix the syntax errors - implement the class with the interfaces just defined by your test
Run the tests again - repeat this process, each time writing just enough code to fix the failures.
Run the tests until they pass.
The code is "done" when all of the unit tests pass.
wikipedia:
http://en.wikipedia.org/wiki/Unit_testingIntegration Testing
wikipedia:
http://en.wikipedia.org/wiki/Integration_testingSystem Testing
wikipedia:
http://en.wikipedia.org/wiki/System_testingAcceptance Testing
wikipedia:
http://en.wikipedia.org/wiki/Acceptance_testing