Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good literature on unit testing? [closed]

Where can I find good literature on unit testing? Book titles and links are welcome.

Update: Here is a list of books mentioned in answers below

xUnit Test Patterns: Refactoring Test Code

Growing Object-Oriented Software Guided by Tests

The Art Of Unit Testing

The real challenge of software testing is solving the puzzle of test design.

Testing Object-Oriented Systems: Models, Patterns, and Tools provides three dozen test design patterns applicable to unit test design. It also provides many design patterns for test automation. These patterns distill many hard-won best practices and research insights.

Pragmatic Unit Testing

Test Driven Development: By Example

like image 490
Marcom Avatar asked Oct 13 '10 12:10

Marcom


People also ask

Is unit testing still relevant?

Unit tests are also especially useful when it comes to refactoring or re-writing a piece a code. If you have good unit tests coverage, you can refactor with confidence. Without unit tests, it is often hard to ensure the you didn't break anything.

What is unit testing with real life example?

An example of a real-world scenario that could be covered by a unit test is a checking that your car door can be unlocked, where you test that the door is unlocked using your car key, but it is not unlocked using your house key, garage door remote, or your neighbour's (who happen to have the same car as you) key.

What happens if unit testing is not done?

If any of the unit tests have failed then the QA team should not accept that build for verification. If we set this as a standard process, many defects would be caught in the early development cycle, thereby saving much testing time. I know many developers hate to write unit tests.


1 Answers

The Art Of Unit Testing

like image 134
Thomas Weller Avatar answered Sep 20 '22 13:09

Thomas Weller