Thomas Sundberg

February 18, 2012

Test coverage in a multi module Maven project

Filed under: Automation, Java, Maven, Test Automation — Tags: , , , , , — Thomas Sundberg @ 09:35

Test driving a project should result in a test coverage of 100% of the code. But how can we know what test coverage we have? Is it even important?

(more…)

January 16, 2012

Missing ant-jsch.jar

Filed under: Automation — Tags: , , — Thomas Sundberg @ 21:25

The distribution of Ant 1.8.2 is broken on Mac.
(more…)

ssh from Ant

Filed under: Automation — Tags: , , , — Thomas Sundberg @ 02:02

You have to patch Ant in order to run ssh from it. It needs a ssh implementation that isn’t bundled with the default distribution. If you just define a task like this:

<sshexec host="somehost"
    username="dude"
    password="yo"
    command="touch somefile"/>

Then you will get the error message below back.
(more…)

December 30, 2011

How many train wrecks are lurking in your code?

Train accidents are mostly considered to be bad things. People tend to get hurt when trains have accidents. Never the less, it is not so uncommon with train wrecks in software development.

Train wreck code is code that calls a method on the return value of another method call. This chain can be very long if a value is excavated deep down in a object graph.

(more…)

November 29, 2011

The simplest possible solution

Filed under: Agile, Clean Code, Java, Programming, Software Craftsmanship, TDD, Teaching — Tags: , — Thomas Sundberg @ 22:02

The simplest possible solution that could work. Ever heard that expression? What does it mean? Really?

The answer is obviously something that in a really simple way satisfies the test you currently are working on. Nothing more, nothing less.

(more…)

November 16, 2011

Testing a Web Service with SoapUI, JUnit, Maven and Cucumber

An example is perhaps the best way to describe something. Concrete examples are easier to understand then abstract descriptions.

I will show how SoapUI can be used to test a web service. I will also show three different tools that can be used to control SoapUI. This tool chain can easily be made a part of your continuous build.

(more…)

October 31, 2011

Why separate test definitions from a driving JUnit class?

Why should the step definitions be separated from the driving JUnit class when using Cucumber for Java?

(more…)

October 18, 2011

Testing a web application with Selenium 2

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 18 October 2011.

(more…)

October 14, 2011

Maven Java heap space

I just had test in a Maven build fail with

java.lang.OutOfMemoryError: Java heap space

(more…)

October 6, 2011

Why isn’t my tests being executed?

Filed under: Automation, Maven, Programming — Tags: , , , , , , , , , , — Thomas Sundberg @ 17:19

Have you ever wondered why your Maven project doesn’t find and execute your tests?

(more…)

Older Posts »

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.