CSC/ECE 517 Fall 2010/ch1 1f TU: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
= Benefits = | = Benefits = | ||
* | Some of the benefits are: | ||
* Proof of your code | |||
* Better design - Thinking about the tests can help us to create small design elements, thereby improving the modularity and reusability of units. | |||
* Documentation - Designers can look at the unit test for a particular method and learn about its functionality. | |||
* Be able to detect and remove defects in a more cost effective manner compared to the other stages of testing | |||
* Be able to test parts of a source code without worrying about the availability of other parts | |||
* Making debugging more efficient by searching for bugs in the probable code areas |
Revision as of 23:58, 4 September 2010
Unit-testing frameworks for Ruby
Unit Testing
A unit is the smallest building block of a software. Such a unit can be: a class, a method, an interface etc. Unit testing is the process of validating such units of code.
Benefits
Some of the benefits are:
- Proof of your code
- Better design - Thinking about the tests can help us to create small design elements, thereby improving the modularity and reusability of units.
- Documentation - Designers can look at the unit test for a particular method and learn about its functionality.
- Be able to detect and remove defects in a more cost effective manner compared to the other stages of testing
- Be able to test parts of a source code without worrying about the availability of other parts
- Making debugging more efficient by searching for bugs in the probable code areas