Home » Author Archives: John Dobie

Author Archives: John Dobie

Easy Unit and Integration Code Coverage

sonar-logo

This example shows how to generate coverage for unit and integration tests using Maven and Sonar. It uses very simple techniques and should only take 10-15 minutes to get running in any existing Maven build. It can be used across unit, integration, ATDD or any other kind of test suite. The coverage results are shown in Sonar. Whats Coming? My ...

Read More »

Code Forensics

software-development-2-logo

How do you know if using code metrics really does help to produce code with fewer bugs. I am convinced they do, but how can I possibly prove it? All projects have historic data. This is usually stored in your bug tracking and source code control tools. We can use the data stored in these systems to perform ‘code forensics’. ...

Read More »

Mocks And Stubs – Understanding Test Doubles With Mockito

mockito-logo

Introduction A common thing I come across is that teams using a mocking framework assume they are mocking. They are not aware that Mocks are just one of a number of ‘Test Doubles’ which Gerard Meszaros has categorised at xunitpatterns.com. It’s important to realise that each type of test double has a different role to play in testing. In the ...

Read More »

Maven Integration Testing And Spring Restful Services

apache-maven-logo

Introduction My original blog showed how to seperate maven unit and integration tests using a very simple example. http://johndobie.blogspot.com/2011/06/seperating-maven-unit-integration-tests.html Since then a lot of people asked me for a more realistic example than the one used originally. This post shows how you split your unit and integration tests using the original method in a realistic environment where the application is ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.