I recently made a code change, and also made the corresponding changes to the unit tests. Once that was sorted and tided away in a commit, I spent another commit refactoring the unit tests. As I was refactoring, I realised that the motivation behind the refactoring, i.e. what was influencing its direction, was a desire … Continue reading Panning for meaning in unit tests
Category: Testing
Language, discrimination and software development
I recently noticed myself using gendered language to talk about computer things where gender was irrelevant. This got me thinking about language, and prejudice and discrimination, more broadly. Beyond the obvious, decency-related reasons, being more open to how people are different from you could help you do your job in IT. Gendered magic The trigger … Continue reading Language, discrimination and software development
Coronavirus, risk and software testing
I was catching up with old episodes of the Radiolab podcast, and one on Coronavirus and numbers made me think about risks to do with Coronavirus, and that thought expanded out to risk more generally and also how it can apply to software testing. UK Coronavirus numbers I need to prefix all this with quite … Continue reading Coronavirus, risk and software testing
Organising technical documents for a good user experience
I was doing some technical writing at work recently, and I realised that I had automatically and unconsciously used a particular structure for the document. It’s not something that geeks like me are always taught – I know it only because my Dad used to help people improve their technical writing. So, in case it’s … Continue reading Organising technical documents for a good user experience
Using User Experience Techniques to Introduce Mutation Testing
Someone posted a question in a Ministry of Testing Slack channel about introducing mutation testing at work. My answer is below, as someone suggested I turn it into a blog post. I've edited it slightly to make it stand on its own rather than as a response to a particular person's question. It's basically a … Continue reading Using User Experience Techniques to Introduce Mutation Testing
Turn the information up to 11
Much of the job of communication is to pass on information to someone. When we design a user interface, it communicates on our behalf. When we write code, including test code, we communicate our purpose for the code to someone else (which could be a future version of ourselves). Sometimes we communicate more obviously and … Continue reading Turn the information up to 11
Testing your view models
In this article I’m going to talk about view models and similar behaviour-free containers of data. I’ll go over why you might want one, and then talk about testing them (yes, really). I use the name view model to make it clear that I'm not talking about models from e.g. machine learning. What is a … Continue reading Testing your view models
Imagination
Imagination might not be the first quality you think of when you think of people who build computer systems. However, I think it’s really helpful for many parts of the process – designing, building and testing it. Old English Digression First, a digression into Scandinavia via UK primary schools. This is my friend Tim Eagling … Continue reading Imagination
Your tests are code too
Imagine if someone submitted some production code for review, which had lots of magic numbers and magic text, lots of repetition, long methods etc. Would you say that code was OK? How much of your unit or integration test code is like that? Seeing the wood for the trees Part of the problem with test … Continue reading Your tests are code too
Tests as sheep dogs for your code
Tests can act as constraints on your code, a bit like sheep dogs herd sheep into a pen. One sheep dog stops the sheep from straying to the left, another stops them from straying to the right, and another moves them forwards towards the pen. The sheep are free to roam where they wish, if … Continue reading Tests as sheep dogs for your code