Every push a build with Travis CI

Build and test your software projects automatically I wanted that cool build passed badge for my projects as I have seen at Github. So I had a look at Travis CI, which is a continuous integration service used to build and test software projects. Let’s have a look at the build file. .travis.yml That’s it. […]

Unit Testing Servlets with Mockito

A quick example how to write unit tests for servlets Okay, I’m writing a Servlet. So I want to write a unit test too. With Mockito this is a quite simple task. Here I show you a simple unit test for a Hello World Servlet. The Servlet returns only „Hello World“. Mockito offers various annotations. For […]

Find duplicate code with CPD

A copy/paste detector I’m sure that you know PMD, the famous static code analyzer. But have you ever tried CPD? Installation CPD belongs to PMD. You have to install PMD first. Command line usage I give you some examples here. minimum-tokens (minimum duplicate size) and files (source directory) are the only required options. Then you can specify the […]