Thomas Sundberg

March 7, 2012

What is a good test?

This post has been migrated to

A colleague asked that question the other day. What is a good test? It is a really difficult question to answer. There are a number of properties that hold true for a good test. I will list some of them and discuss why I think they are important. Others may think that the order of importance is different or that other properties are more important then those that I list.

I will show some examples using Java and JUnit of what I think are bad tests and how they can be refactored to something better.

Tests are automated in my world. I always try to avoid manually testing. The main reason for this is that manual testing is slow and hard to repeat arbitrary many times. Therefore, test should be read as automated test in for the rest of this text.


October 18, 2011

Testing a web application with Selenium 2

This post has been migrated to

Selenium a great tool for testing web applications. The current version, Selenium 2, is a merge between Selenium and WebDriver. I will walk you through an example where we test a web site using Selenium in a few different ways. This is the same example as I demonstrated at Scandev on tour in Stockholm 18 October 2011.


July 11, 2010

Parameterized JUnits tests

This post has been migrated to

We want to run the same test more than once and only vary the parameters. The solution is to use JUnit and run our tests with the Parameterized JUnit runner.


Create a free website or blog at


Get every new post delivered to your Inbox.

Join 85 other followers