Tutorials and resources on how to apply unit testing in software testing
In this blog post, Sylvain Francois explores the differences between the best practices coming from “ivory towers” and reality of daily projects for unit testing.
This blog post discusses the problem of testing the database code. It describes some of the problems and proposes possible partial solutions to this testing issue based on Hibernate and JUnit.
Broad assertion cuts out too large a chunk of output and side effects for bit-to-bit comparison, which makes it harmful due to the resulting brittleness. The assertion fails if any small detail changes, regardless of whether that change is relevant to the interests of this particular test. In this article, based on chapter 4 of Unit Testing in Java, author Lasse Koskela explains how to refactor the tests that suffer from broad assertion.
This article provides 3 tips to create readable unit tests.
This post tries to summarize the high level basics of writing testable code.
A test is not a unit test if: * It talks to the database * It communicates across the network * It touches the file system * It can’t run at the same time as any of your other unit tests * You have to do special things to your environment (such as editing config files) to run it.