What is Unit Testing?
Testing smallest testable parts of an application. Unit testing only consider about the unit under test. Later you can do integration testing to verify other parts of the application. Unit testing can be very time consuming thing and you need to understand not all flows might not get covered here. Unit testing can be done manually as well as can be automated.
Using unit testing you can make sure the work you have done has not broken by running the tests. (Definition of Unit Testing).
Benefits of unit testing
- Reduces bugs in production code (by identifying before)
- Automated tests can be run frequently
- Form of documentation
- Inspire confidence (You know your code is working)
Disadvantages/ When not to use
Unit Testing Terminology
Mocks : Stand in object used to check results of a test
Fakes : Acts like the real object
Stubs : Provides valid response
Dummies : Contains no implementation
Unit testing in JavaScript
Unit testing KnockoutJS applications
Some Unit Testing tools
For .NET. Not free.
Resources
http://www.sencha.com/blog/automating-unit-tests Good read
https://softwareengineering.stackexchange.com/questions/tagged/tdd
https://softwareengineering.stackexchange.com/questions/tagged/tdd
0 comments:
Post a Comment