Skip to main content

Posts

Rage Against the Machinery

  I often review and collaborate on unit tests at work. One of the patterns I see a lot is this: there are a handful of tests, each about a page long the tests share a lot of functionality, copy-pasted the test data is a complex object, created inside the test the test data varies little from test to test. In Kotlin-ish pseudocode, each unit test might look something like this: @Test fun `test input against response for endpoint` () { setupMocks() setupTestContext() ... val input = Object(a, OtherObject(b, c), AnotherObject(d)) ... val response = someHttpCall(endPoint, method, headers, createBodyFromInput(input) ) ... val expected = Object(w, OtherObject(x, y), AnotherObject (z)) val output = Object(process(response.getField()), otherProcess(response.getOtherField()), response.getLastField()) assertEquals(expected, output) } ... While these tests are generally functional, and I rarely have reason to doubt that they
Recent posts

Schmivehundred!

  When I opened Blogger the other morning I saw that the Hiccupps all-time page view counter had ticked up to exactly 500000. My initial feeling was pleasure. Ooh! A milestone! Half a million views! Get me ! But that was fleeting.  As with many metrics, today's value is almost the least engaging aspect. What's more interesting is what the number represents, what it is desired that it should represent, and how closely those two concepts align on axes that matter. Also interesting: who wanted this metric (and there may be multiple interested parties) and whether they still want it, what assumptions are being made about it, what values (or milestones) matter, what it is being plugged into, and what decisions are made using it. That's not all, of course, because one sample is just one sample. More interesting is where it sits in context to others, if and how it is trending, and whether it correlates with relevant related metrics over the same period. I could go on. I don't

The Bell at Albion Bottle

When my dad retired around 20 years ago, I got him a second hand PC and have been serving as first, second, and third-line tech support for him and occasionally his mates ever since.  He's an inveterate story teller and, for a laugh, one time I told him he should write all of his tales down and give them numbers. Then, instead of telling them (again) he could just say the number and we'd all laugh, saving everybody time. Well, he called my bluff so I'm now mid-way through editing a 300-page Word document he sent me and if I ask him about a detail of one of the stories, he recounts the entire thing. Clearly my idea has backfired spectacularly. Even funnier, this opus only describes his early life in Smethwick and the various jobs he had between leaving school with no qualifications and retirement. Our family stories are in another epic file I haven't even seen yet! The joke is well and truly on me. Still, the pages are full of gold and h ere I'm sharing an escapade

Farewell AST

After four years, three of them as Vice President, I'm standing down from the board of the Association for Software Testing . Let me say up front that I am an unapologetic romantic about my craft. (And, yeah , I called it a craft. Sue me.) I believe in what AST stands for, its mission , and in context-driven testing , so it's been an absolute privilege to be involved in running the organisation. It's also been fun, and full of difficult situations and choices, and hard work on top of family life and a day job. There also was the small matter of the global Covid pandemic to deal with. The immediate impact was on CAST, our annual conference , and in some ways the beating heart of the AST. We had to variously cancel, reschedule, and move CAST online and we are still experiencing the after-effects as we organise the 2023 in-person event . So why am I leaving? Well, first, I'm not leaving the organisation, only the board. I am a life member and

Can Code, Can't Code, Is Useful

The Association for Software Testing is crowd-sourcing a book,  Navigating the World as a Context-Driven Tester , which aims to provide  responses to common questions and statements about testing from a  context-driven perspective . It's being edited by  Lee Hawkins  who is  posing questions on  Twitter ,   LinkedIn , Mastodon , Slack , and the AST  mailing list  and then collating the replies, focusing on practice over theory. I've decided to  contribute  by answering briefly, and without a lot of editing or crafting, by imagining that I'm speaking to someone in software development who's acting in good faith, cares about their work and mine, but doesn't have much visibility of what testing can be. Perhaps you'd like to join me?   --00-- "If testers can’t code, they’re of no use to us" My first reaction is to wonder what you expect from your testers. I am immediately interested in your working context and the way

Tri Again

    A long stretch of a major route into Cambridge is being widened at the moment. To facilitate the work, one of the road junctions near my house was out of action for a long time and only reopened the other day. I didn't quite do a Laurel and Hardy comedy double-take as I walked past it for the first time, but I certainly took a second look. And a photo. Why? Because the triangle is painted the wrong way round and is, I think now that I've skimmed the regulations , too close to the double-dashed lines across the road as well.  In fact, it seems that the triangle may not even be required but, if it is used, it should look like the left-hand side here: Of course, we all occasionally mess up the simple job that we've done a million times before because we're on autopilot, or rushing, or doing something else at the same time. Understandable, but embarrassing and difficult to unsee or live down, particularly if there is a significant unwanted side-effect, such as a car cra

Postman Curlections

My team has been building a new service over the last few months. Until recently all the data it needs has been ingested at startup and our focus has been on the logic that processes the data, architecture, and infrastructure. This week we introduced a couple of new endpoints that enable the creation (through an HTTP POST) and update (PUT) of the fundamental data type (we call it a definition ) that the service operates on. I picked up the task of smoke testing the first implementations. I started out by asking the system under test to show me what it can do by using Postman to submit requests and inspecting the results. It was the kinds of things you'd imagine, including: submit some definitions (of various structure, size, intent, name, identifiers, etc) resubmit the same definitions (identical, sharing keys, with variations, etc) retrieve the submitted definitions (using whatever endpoints exist to show some view of them) compare definitions I submitted fro

README

    This week at work my team attended a Myers Briggs Type Indicator workshop. Beforehand we each completed a questionnaire which assigned us a personality type based on our position on five behavioural preference axes. For what it's worth, this time I was labelled INFJ-A and roughly at the mid-point on every axis.  I am sceptical about the value of such labels . In my less charitable moments, I imagine that the MBTI exercise gives us each a box and, later when work shows up, we try to force the work into the box regardless of any compatiblity in size and shape. On the other hand, I am not sceptical about the value of having conversations with those I work with about how we each like to work or, if you prefer it, what shape our boxes are, how much they flex, and how eager we are to chop problems up so that they fit into our boxes. Wondering how to stretch the workshop's conversational value into something ongoing I decided to write a README for me and

Collect, Arrange, and Slice

  Last month I started thinking about slicing , my instinctive approach to looking for perspectives on a problem, an opinion, an observation, or anything else. This time around I've got an example to talk about. On Fridays I ensemble with a group of medical quality engineers and medical knowledge engineers. We learn from each other, about testing and about the domain. On and off recently we've looked at a project of theirs which aims to understand better what work they do, how they do it, and why it's that way, and then write it up for internal and external consumption. In one early session, with a wider group in the company, there was an extremely open and exciting conversation about what should be covered in this effort.  It was the kind of discussion that greenfield projects often have, before scope is nailed down, where the world seems ripe with possibility, no difficulties have been identified, and there is no talk of who will taking respons

Testers are Gate-Crashers

  The Association for Software Testing is crowd-sourcing a book,  Navigating the World as a Context-Driven Tester , which aims to provide  responses to common questions and statements about testing from a  context-driven perspective . It's being edited by  Lee Hawkins  who is  posing questions on  Twitter ,   LinkedIn , Mastodon , Slack , and the AST  mailing list  and then collating the replies, focusing on practice over theory. I've decided to  contribute  by answering briefly, and without a lot of editing or crafting, by imagining that I'm speaking to someone in software development who's acting in good faith, cares about their work and mine, but doesn't have much visibility of what testing can be. Perhaps you'd like to join me?   --00-- "Testers are the gatekeepers of quality" Instinctively I don't like the sound of that, but I wonder what you mean by it. Perhaps one or more of these? Testers set the quality sta