Tag Archives: testing

Testing equals() with Guava

I’ve long held the opinion that Guava belongs on every Java classpath because its design and the quality of its implementation surpass other comparable utility libraries (and sometimes even the JDK). Guava’s testlib is pretty cool, too, even though it’s … Continue reading

Posted in java | Tagged , , , | Leave a comment

Writing Hamcrest Matchers

JUnit 4 introduced a fancy DSL based on the Hamcrest framework for expressing assertions. JUnit ships with the most important matchers and you can always add Hamcrest to your classpath if you need more. Sometimes no existing matcher fits your … Continue reading

Posted in java | Tagged , , | Leave a comment

JUnit: Using External Resources

Many integration test cases need access to external resources like files or databases. Dealing with external resources is always messy because you have to set up state and tear it down later. Since JUnit 4.7, there’s a mechanism that makes … Continue reading

Posted in java | Tagged , , , | 2 Comments

Java: Finding Package Cycles

JDepend is a tool for detecting cycles between your Java packages. It is often used from a Maven plugin to generate reports for the project’s Maven site. In most teams, however, people only look at these reports from time to … Continue reading

Posted in java | Tagged , , | 2 Comments

New Project: JSysTest

I love unit tests and use them whenever possible. But in the end, there’s no substitute for a full scale system test. Only after system testing, you can be sure that everything works as intended. When I was looking for … Continue reading

Posted in java | Tagged , , , , | Leave a comment

Testing C++ Applications using CppUnit

Unit testing is hip these days and every programming language has its own JUnit clone that mimics the original more or less closely. For C++, there’s the excellent CppUnit package that I’ve been using extensively lately. Unfortunately, C++ is less … Continue reading

Posted in c/c++ | Tagged , , , | 3 Comments