Testing
Automated iOS Testing with Zucchini
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.
How much duplication should we tolerate in tests?
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:
Shared Examples with Jasmine
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.
Test Behavior, Not Implementation
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.
Using AutoMapper
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.
Generating Test Data with AutoPoco
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.
Using and Testing HTML Helpers in MVC
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.
How to Debug Fitnesse Fixtures
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.
Unit Testing – Why I didn’t like it at first
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.
Testing Asynchronous Code
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.
That’s NOT Unit Testing
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.
Lightweight Test Automation Framework – Automated Build Support
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.
Integration Testing – Lightweight Test Automation
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.
Integration Testing – Selenium
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.
Integration Testing – Fitnesse
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.