An Automated OSGi Test Runner

On July 4, 2013, Posted by , In Eclipse,JUnit,OSGi, By ,, , With 2 Comments

Among my fellow team members, I was known for notoriously forgetting to maintain the (JUnit) test suite. I just can’t get this extra step of manually adding a test to a suite into my fingers. Fortunately, there are continuous integration servers that collect tests by a naming pattern. If one…

Running JUnit Tests Repeatedly Without Loops

On April 10, 2013, Posted by , In JUnit, By ,,, , With 26 Comments

Recently I came across a problem where I had to write tests for a method that calculates randomly distributed values within a certain range of possibilities 1. More precisely if you assume a signature that looks like interface RandomRangeValueCalculator { long calculateRangeValue( long center, long radius ); } a test…

A Simple way to extend SWTBot

On October 26, 2012, Posted by , In Eclipse, By ,, , With Comments Off on A Simple way to extend SWTBot

SWTBot is an Eclipse project that enables you to write functional tests for SWT and Workbench based applications in Java. It has API to remote control the application under test and matcher to find widgets and examine their state. For each widget, there is a corresponding bot class with methods…

JUnit Rules

On September 24, 2012, Posted by , In JUnit, By ,,, , With 20 Comments

The first time I stumbled over a JUnit @Rule annotation I was a bit irritated of the concept. Having a public field in a test case seemed somewhat odd and so I was reluctant to use it regularly. But after a while I got used to that and it turned…

Running HTTP/REST Integration Tests efficiently in Eclipse

On September 10, 2012, Posted by , In Eclipse,JUnit, By ,,,,, , With 8 Comments

Lately I had a chance to use the OSGi-JAX-RS-Connector library written by my dear fellow Holger Staudacher. The connector enables you to publish resources easily by registering @Path annotated types as OSGi services – which actually works quite nicely. While it is natural for me to write the service classes…

Stress/Load-Testing of Asynchronous HTTP/REST Services with JMeter

On November 28, 2011, Posted by , In Common, By ,,,,, , With 31 Comments

Although I have been using JMeter for stress- and load-testing of web applications a good few times it took us a while to figure out how to test asynchronous HTTP/REST based services with the tool. With us I mean a fellow programmer – Holger Staudacher, I have the honor to…