Home » Tag Archives: Testing (page 13)

Tag Archives: Testing

A Docker Maven Plugin for Integration Testing


What is Docker? Docker is the buzzword that is taking the DevOps world. If you don’t know yet what is Docker, be warned, you will find yourself using it one way or another very soon. The rest of this post assumes some basic understanding of Docker, but if you are not familiar with it now, I’m sure you will come ...

Read More »

How (NOT TO) measure latency


Latency is defined as time interval between the stimulation and response and is a value which is of importance in many computer systems (financial systems, games, websites, etc). Hence we – as computer engineers – want to specify some upper bounds / worst case scenarios for the systems we build. How can we do this? The days of counting cycles ...

Read More »

Are integration tests worth the hassle?


Whether or not you write integration tests can be a religious argument: either you believe in them or you don’t. What we even mean by integration tests can lead to an endless semantic argument. What do you mean? Unit tests are easy to define they test a single unit: a single class, a single method, make a single assertion on the behaviour ...

Read More »

What are Mockito Extra Interfaces?


Mockito is my favored little helper if it comes down to write light weight JUnit tests. It is very useful to replace the ‘real’ dependencies of a unit under test easily by mocks if necessary. In particular when working on the borderline to framework APIs such dependencies can otherwise be very expensive to setup. But sometimes the situation is a ...

Read More »

JUnit ExpectedException rule: beyond basics


There are different ways of handling exceptions in JUnit tests. As I wrote in one of my previous posts, my preferable way is using org.junit.rules.ExpectedException rule. Basically, rules are used as an alternative (or an addition) to methods annotated with org.junit.Before, org.junit.After, org.junit.BeforeClass, or org.junit.AfterClass, but they are more powerful, and more easily shared between projects and classes. In this ...

Read More »

Getting JUnit Test Names Right


Finding good names is one of the challanges of crafting software. And you need to find them all the time and for everything – classes, methods, variables, just to name a few. But what makes a name a good name? To quote Oncle Bob: ‘Three things: Readability, readability, and readability!’ Which he defines later one by clarity, simplicity and density ...

Read More »

The Importance of Unit Testing


I’m currently working on an enhancement to an existing insurance premium rating algorithm. Anyone who has done work in insurance (whether it be in IT or on the business side) is probably well aware of how complex this can become. Consequently, any significant enhancement to such a system is quite likely to be fraught with pitfalls and setbacks, and that’s ...

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.