Skip to content

Wakaleo Consulting

  Home Blog
  • Training and Mentoring in Test Driven Development
  • Training and Mentoring in Test Driven Development
  • Expertise in Automated Acceptance Tests and ATDD
  • Training and Mentoring in Test Driven Development
  • Expertise in Continuous Integration and Continuous Deployment
  • Training and Mentoring in Test Driven Development
  • Expertise in quality development and testing practices
  • Expertise in Continuous Integration and Continuous Delivery
  • Expert Jenkins/Hudson training and mentoring
Agile Australia PDF Print E-mail
Tuesday, 01 May 2012 10:19

I am really pleased to be involved in the upcoming Agile Australia Conference, being held at the end of May in Melbourne. This year I’ll be running one of the pre-conference workshops that aim to offer in-depth learning to small groups.

The workshop I’m taking is called From Continuous Integration to Continuous Delivery - Deploy projects on demand. In it I’ll be discussing how Continuous Delivery is the highest form of Continuous Integration, and how successful Continuous Delivery actually involves a mindset change. Find out more about what I'll be covering.

If you’re interested in coming along you can register online for 2 or 4 workshops – conference delegates can attend the workshops for a reduced cost, but you don’t have to be attending the conference to go to the workshops.

I’m looking forward to meeting all you ‘Agile Australians’ out there!

 
Paddy Power Technology Series PDF Print E-mail
Wednesday, 14 March 2012 12:14

I’ve just returned from Ireland, where I was presenting a seminar on Clean Code Practices for Java Developers at the Paddy Power Technology Series. You can view my presentation notes.

I also gave a presentation introducing Thucidydes, which included a live coding demonstration. You can find out more about it.

While there I also trained two teams at Paddy Power (an online betting agency, for those who don’t know) in Test Driven Development, Acceptance Test Driven Development, and Automated Web Testing. They were very happy to receive the training and were interested to find out how using clean coding practices could improve their overall code quality. I was really impressed with the Paddy Power teams’ level of technical expertise. (And for those of you in Ireland, or looking to move, they are currently recruiting!)

Dublin is a great city and I really enjoyed my time there. Here’s a scenic shot of the famous Ha’penny Bridge over the Liffey River that runs through the fair city of Dublin. I hope to be back again soon!

 
Managing state between steps PDF Print E-mail
Wednesday, 22 February 2012 13:28

Sometimes it's useful to be able to pass information between steps. For example, you might need to check that a client's details entered into a registration form appear correctly on a confirmation page later on.

You could do this by passing values from one step to another, however this tends to clutter up the steps. Another approach is to use the Thucydides test session, which is essentially a hash map where you can store variables for the duration of a single test. You can obtain this session map using the Thucydides.getCurrentSession() static method.

As illustrated here, you can p
@Step
public void notes_publication_name_and_date() {
    PublicationDatesPage page = pages().get(PublicationDatesPage.class);
    String publicationName = page.getPublicationName();
    DateTime publicationDate = page.getPublicationDate();

    Thucydides.getCurrentSession().put("publicationName", publicationName);
    Thucydides.getCurrentSession().put("publicationDate", publicationDate);
}

Then, in a step invoked later on in the test, you can check the values stored in the session:

public void checks_publication_details_on_confirmation_page() {

    ConfirmationPage page = pages().get(ConfirmationPage.class);

    String selectedPublicationName = (String) 
Thucydides.getCurrentSession().get("publicationName");
    DateTime selectedPublicationDate = (DateTime) 
Thucydides.getCurrentSession().get("publicationDate");

    assertThat(page.getPublicationDate(), is(selectedPublicationName));
    assertThat(page.getPublicationName(), is(selectedPublicationDate));

}

If no variable is found with the requested name, the test will fail. The test session is cleared at the start of each test.

 
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...
 
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Page 1 of 17