Functional testing and the secret of happiness

I’ve started going through my Hellbound project and replacing some of the mocks I’ve been using in JBehave with real code.

This means, of course, that the functional tests which relied on the mocks for verification don’t do anything any more. In fact, the only way to test that Hellbound is working is by looking at the front-end.

I guess this is why packages like JFCUnit and Abbot were developed; to allow testers to get hold of the application guis and automate the tests. The only way to test a client-side application is by looking at the gui (or by checking output files, I guess). But by and large if the screen looks right, and the users can’t tell the difference between a back end made up of persistence layers and databases and J2EE technology, and a bunch of monkeys running round with bananas into which the data has been carefully etched, then it doesn’t really matter what the back-end is.

Hellbound is a game, so the users are happy if the game lets them play it. The system I’m actually being paid to produce is a retail till application, so the users are happy if they can sell things, and people are happy if they can buy things.

So really, the only way to test if your system works is if people are happy.

There are other ways to make people happy. I’m convinced that the secret of happiness, particularly in the kind of culture which permits retail till applications, is to look at what you’ve got and not at what everyone else has; to stop being jealous of success and wealth and start appreciating your own. So all I really need to do is convince the whole of western civilisation that there’s a better way, then it won’t really matter if my code works or not.

I have a sneaking suspicion that it might be easier to learn to write functional tests properly.

This entry was posted in Uncategorized. Bookmark the permalink.

4 Responses to Functional testing and the secret of happiness

  1. icklemichael says:

    the users can’t tell the difference between a back end made up of persistence layers and databases and J2EE technology, and a bunch of monkeys running round with bananas into which the data has been carefully etched

    You mean that isn’t how oracle is implemented?

  2. boryon says:

    Dammit Michael, you’ve found out that my job is really herding monkeys!

    So much for that secret 😛

    Chris

  3. sirenian says:

    I probably shouldn’t say this, but you know that defence project I worked on when I first started Java? Well, that was based on a monkey protocol with banana encryption. They had a whole system for tracking the monkeys, counting the bananas, and identifying which monkeys had security clearance for top-secret bananas.

    Unfortunately they found out during the integration phase that the monkeys tend to eat the bananas before delivery. This typical lack of forethought is the reason why defence projects cost so much and usually fail.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s