JUnit is one of the most popular testing frameworks out there. Version 4.11 has just been released and offers some nice improvements that you shouldn’t miss.
Articles Tagged ‘hamcrest’
Everyday we’re writing tests for our software and sometimes we’re in a situation where we’re testing a specific type or object very often.
Luckily Hamcrest allows us to create custom matchers by subclassing from a given variety of available matchers.
Today we’re going to take a look at two specific frameworks that enables you to efficiently test your REST-ful services: On the one side there is the framework REST-assured that offers a nice DSL-like syntax to create well readable tests – on the other side there is the Jersey-Test-Framework that offers a nice execution environment and is built upon the JAX-RS reference implementation, Jersey.
In the following tutorial we’re going to create a simple REST service first and then implement integration tests for this service using both frameworks.
The title of this article might be misleading due to the fact that I am not going to compare both frameworks to choose a winner, just showing the different approach ..
Today we’re going to take a look at the Mockito framework that not only does sound like my favourite summer cocktail but also offers nice testing, mocking/stubbing, test-spying features and mock injections.
After that we’re going to take a look on how to mock static or final classes by extending Mockito’s capabilities with PowerMock.