Java Software Testing tutorials: unit testing, open source, JUnit, Mockito, TestNG, Spring, JGiven, etc.

Unit Testing in Java: Broad Assertion

February 28, 2011 1

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.

Converting JUnit Tests to TestNG

January 20, 2011 0

In this blog post, Cédric Beust describes the new TestNG features that allows to convert Java unit tests from JUnit 3 and JUnit 4 to TestNG.

Writing Testable Code

April 2, 2010 0

The article “Writing Testable Code” presents practices to write more testable code with many examples in java, going a step further than just TDD.

1 7 8 9