Skip to content

Wakaleo Consulting

  Home Blog
  • Expertise in quality development and testing practices
  • Expertise in Continuous Integration and Continuous Deployment
  • Expertise in Continuous Integration and Continuous Delivery
  • Training and Mentoring in Test Driven Development
  • Training and Mentoring in Test Driven Development
  • Training and Mentoring in Test Driven Development
  • Expert Jenkins/Hudson training and mentoring
  • Training and Mentoring in Test Driven Development
  • Expertise in Automated Acceptance Tests and ATDD
Faster Web Tests with Parallel Batches in Thucydides PDF Print E-mail
Sunday, 25 December 2011 12:49

Web tests are as a rule much slower than other types of tests, but they can be sped up significantly by running them in parallel. However, this is often harder to implement than it sounds. The latest version of Thucydides (version 0.6.0) comes with support for running parallel test batches, making this task much easier.

Read more...
 
Some useful new Hamcrest matchers for collections PDF Print E-mail
Monday, 12 December 2011 11:23

Hamcrest is a neat little library that lets you write more fluent and readable tests. For example, rather than writing:

    assertEquals("red", color);
you would write:
    assertThat(color,is("red"));
This makes for tests that express their intent much more clearly, which in turn makes the tests easier to understand and to maintain, and more likely to be correct. This is generally considered to be a Good Thing.

A version of Hamcrest is actually bundled with JUnit. However it is somewhat dated, and the more recent versions of Hamcrest come with a lot more features, particularly with regards to working with collections. You can use the latest version of Hamcrest by using the junit-dep dependency instead of junit, and configuring your dependencies as shown here:

    <dependency>
	    <groupId>junit</groupId>
	    <artifactId>junit-dep</artifactId>
	    <version>4.10</version>
	    <scope>test</scope>
	    <exclusions>
	        <exclusion>
	            <groupId>org.hamcrest</groupId>
	            <artifactId>hamcrest-core</artifactId>
	        </exclusion>
	    </exclusions>
	</dependency>
	<dependency>
	    <groupId>org.hamcrest</groupId>
	    <artifactId>hamcrest-library</artifactId>
	    <version>1.3.RC2</version>
	</dependency>

Read more...
 
Code Coverage as a refactoring tool PDF Print E-mail
Sunday, 15 May 2011 22:37
Using code coverage to help with refactoring, when combined with TDD, is a powerful tool. This article discusses how.

I am a big fan of using code coverage as a developer tool to promote more reliable, better tested code. The merits and limits of code coverage are widely discussed and fairly well known. Essentially, the big strength of code coverage is revealing code that has not been exercised by your unit tests. It is up to you, as a software development professional, to establish why this code has not been exercised by your unit tests, and whether it is significant. It is also up to you to ensure that your tests are of sufficient quality to ensure that the code that is exercised during the tests is effectively well tested.

In this article I don't want to discuss those aspects of code coverage. Instead I want to look at how code coverage can be a useful tool in a TDD practitioner's toolbox, in particular during the refactoring phase. Indeed, Using code coverage to help with refactoring, when combined with TDD, is a powerful tool.

Read more...
 
Integration Test Driven Development - the Vietnam of TDD PDF Print E-mail
Tuesday, 10 May 2011 09:17

Sometimes, even if you are generally applying good Test Driven Development practices, you can find yourself slipping into what I call Integration-Test Driven Development, or ITDD. Essentially, this is when you use a high level integration or functional test to know if your low-level code changes are having the desired effect. So you need to build several modules of your app, or even your whole app, to see if your code is correct.

This is a Bad Thing.

Read more...
 
Code coverage metrics and Functional Test Coverage PDF Print E-mail
Wednesday, 04 May 2011 09:52

There have been some articles and tweets about code coverage recently, and it seems that many developers are still laboring under a few misconceptions in this area.

Code coverage can be a very useful metric. However you need to know how, and when, to use it. The link between code coverage and test quality is tenuous at best - in short, high code coverage is, in itself, no guarantee of well tested code. And increasing code coverage for the sake of code coverage will not necessarily improve either the quality of your tests or the quality of your application. It is easy (and obviously a largely futile exercise) to achieve high code coverage metrics without actually testing anything at all.

Read more...
 
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Page 1 of 16