Testing

Automated iOS Testing with Zucchini

Apr 2, 2013

This week I was looking for an appropriate testing framework for the iPad app I’m working on. I say ‘appropriate’ because the app is rather unique in that it’s very content driven and therefore it’s difficult to write tests that catch regression bugs. We had already integrated Frank and Kiwi into our app with limited success, but it’s rather difficult to write tests to see that animations are firing in the correct way or that a certain page has the correct background.

Read More →

How much duplication should we tolerate in tests?

Nov 16, 2012

As a developer I’m used to avoiding duplication in code. Avoiding duplication is even listed as one of the 4 rules of the TDD cycle:

Read More →

Shared Examples with Jasmine

Sep 20, 2012

On my current project we’re doing quite a bit of JavaScript development using CoffeeScript and the Spine.js framework. Since we practice TDD we’re using Jasmine to drive all our CoffeeScript code and I’ve found it to be a great little framework.

Read More →

Test Behavior, Not Implementation

Jan 25, 2012

While I was reading the Ruby Pickaxe book I came across an example of Unit Testing which – in my opinion – is testing implementation rather than behavior. This particular example was used to explain Duck Typing in Ruby, but I think it illustrates that it’s pretty easy to write tests which end up testing the wrong thing.

Read More →

Using AutoMapper

Feb 8, 2011

AutoMapper is an incredibly useful little tool – it uses conventions and a fluent API to configure and perform mappings between objects.  This is especially useful when using view models – you often end up having to write boilerplate code simply to map between 2 types of objects.

Read More →

Generating Test Data with AutoPoco

Jan 28, 2011

I often run into a scenario where I want to use test data – either for unit testing, integration testing, or simply to have some data for manually testing an application.  Writing classes to generate this testing data can be rather time-consuming, so when someone on twitter mentioned AutoPoco I thought I would take a look.

Read More →

Using and Testing HTML Helpers in MVC

Jan 17, 2011

If you’ve done any amount of development with MVC you are probably aware that it’s pretty easy to end up with a lot of clutter in your views.  Today I’m going to illustrate how we can use custom helpers to neaten views and also show how we can write unit tests for those helpers.

Read More →

How to Debug Fitnesse Fixtures

Nov 30, 2009

I was recently discussing the advantages and disadvantages of Fitnesse with a colleague and he mentioned that one of the biggest drawbacks is that you can’t debug fixtures.  I have managed to debug fixtures using the technique I’m going to outline here.  I haven’t actually seen this technique mentioned anywhere so if you are aware of a better way of doing this please let me know using the comment section below.

Read More →

Unit Testing – Why I didn’t like it at first

Nov 24, 2009

When introducing a fellow software developer to the concept of unit testing you will very rarely be met with optimism.  In fact, most developers will quickly point out that writing both the code and the unit tests will effectively double the amount of work that needs to be done and therefore increase timelines.  This is especially the case if you’re working in an environment where looming deadlines are the norm, rather than the exception.

Read More →

Testing Asynchronous Code

Oct 28, 2009

Today I was trying to apply TDD to a piece of code that executes on a separate thread.  The code in question basically creates a new thread and specifies a delegate to be executed on the background thread.

Read More →

That’s NOT Unit Testing

Jul 28, 2009

I’ve been rather quiet in the last couple of weeks.  Mostly I’ve been busy trying to learn WPF so you can expect to see a couple of blogs on that once I get the hang of it.  First thoughts on WPF:  it’s tricky.

Read More →

Lightweight Test Automation Framework – Automated Build Support

Jun 22, 2009

In my last post I had a look at Microsoft’s new Integration Testing platform for web applications, the Lightweight Test Automation Framework.  I’ve had some feedback from one of the developers for the framework and I’ve decided to take a look at how we can address some of the issues I raised, rather than just moan about them.

Read More →

Integration Testing – Lightweight Test Automation

Jun 17, 2009

In my previous 2 posts I had a look at 2 Integration Testing tools – Fitnesse and Selenium.  In this post I’m going to take a look at the new Microsoft Web Testing tool – Lightweight Test Automation Framework.

Read More →

Integration Testing – Selenium

Jun 16, 2009

In my last post I had a look at a little-known Integration testing framework called Fitnesse.  In this post I’m going to look at one of the more well-known ones – Selenium.

Read More →

Integration Testing – Fitnesse

Jun 15, 2009

I read an interesting article by Steve Sanderson on Integration Testing your ASP.NET MVC Application. I have never really been a fan of what Microsoft have done with testing frameworks – I usually prefer NUnit to MSTest (the built-in Visual Studio testing framework) and the Microsoft presentations that I’ve seen on the other testing tools they provide I found rather… sub-par. Despite this I think it’s great that they are making an effort in this area.

Read More →