Markus Gärtner's Blog, page 7
August 28, 2022
Follow-up on: How do you automate tests through the GUI?
This blog entry is a follow-up answer I got after my tutorial session on ATDD/BDD at the recent SoCraTes conference in Soltau, Germany (YAY! We’re back to conferring in person!) After showing the participants how I struggle with a new (to me) ATDD/BDD testing framework, raw and unscripted, alongside answering questions raised by the attending participants, one person approached me with a question that I could not answer on the spot directly since I needed a break. Although I offered to get back to me later during the conference days, we never got to chat again. Maybe this might be of some help to others.
All that said, the question raised as I recall understanding it was something like this:
How would you test an application on the user interface? We have this old application, pretty old, and we just seem able to hook examples exemplifying business rules by going through the GUI.
My elobarate answer(s) and perspective(s) are the following.
First things first: Avoid automating your tests through the GUI whenever you canWithout going into too much detail, user interface components and the main application on modern systems usually run in separate threads in the operating system you are using in order to not block execution between the two. That holds for rich clients and desktop applications in the same way as the web frontend of your website or your mobile phone frontend to some service somewhere. Usually, these two – for the sake of simplicity let’s assume we have two though there might be more – separate threads have measures to call a function on the other thread in order to carry out the task at hand. In order to stay responsive, these exchanges mostly happen with asynchronous interactions between the two threads.
So, when running an automated test against the GUI, triggering GUI components to carry out the actions as if a user clicked on the GUI, you end up with maybe three different things running in separate threads: your automated test runner, the GUI component, and the main component where the magic might happen. Since your test probably carries out some button click or text input into a text field then calling some other components to store the text in the database or something, you probably want to check that the resulting operation did the right thing and persisted the data your automated test put in.
In order to check for the right results or wait for an operation to complete, your test would need to actively wait for the end of the operation that you triggered. Since all this stuff runs asychronously, you need to put in active waiting cycles into your automated test code. What that means is that you check the GUI component for an expected result for example, if it’s not there (yet), put your test runner thread to sleep for a period of time, then check again, after some time, finally either finding the expected result or failing the test after a couple of retries whenever a configurable timeout applies.
All such active waiting looking for an asynchronous result will take time away from your overall test automation runtime, providing your less timely feedback. Personally, I like to stick with the XP practice of a 10-minute build, meaning compilation, unit test execution, and static code analysis provide me feedback for my code base within 10 minutes, or else I start to actively look for ways to make my builds faster. In my experience, there is a similar threshold when thinking about automated acceptance checks around the 90-120 minute marker where I do the same as well. Usually, tests operating through GUI elements are the first ones to speed up whenever I take a closer look into my test suites due to the above-mentioned reasons. If you can avoid the slow-down from the get-go, you’ll find yourself in a way more feedback-driven situation for longer. So avoid automating tests through the GUI as long as possible.
One last thing, in case you don’t know how to do that, I found the invaluable xUnit Test Patterns book a good start for that as well. You can read most of the patterns online as well.
Yeah right, but what if we really can’t change anything there and have to go through the GUI?Of course, I realize that person that approached me probably asked the question for a reason and considered all I said in the above chapter. Having exhausted all other options, you may sometimes end up in a situation where there is currently no other option available to you rather than exercising your tests through the graphical user interface. To explain my rationale, maybe a picture says more than a thousand words:

On the bottom, we find the application we want to automate tests for. No matter where your entry point to that application lies, your automated tests need to call functions in it. The box I called Libraries in the picture above can be thought of as a variety of different things that are available, and sometimes I split that box up into two or three different smaller boxes, usually the following: API drivers, UI drivers, and “non-official” drivers. What do I mean by those?
API drivers directly call official existing functions. For example, the GUI is hooked up through some calls to your application. Rather than going through the GUI, we go through those API calls, leading to less asynchronous wait time when running our tests, yet, leaving the minimal risk of whether the GUI is hooked up correctly to those API calls – maybe addressing that risk by just a set of exploratory test sessions before we ship.
By “non-official” drivers I’m referring to entry points to the system under test that just exist in our test environment, maybe. At my previous employer, we were testing tariffs and lifecycles in the mobile phone provider business. Some of these relied on running on a certain date in the month for different results, i.e. if that person made payments until the 21st of the month, the business rules had different outcomes. In order to yield reliable results when automating our tests, we had to make sure that some tests ran on the 19th of July 2079, and others on the 22nd of August 2078. There was an unofficial entry to the system to manipulate the system time, that helped us there. Of course, you don’t ship such a mechanism with your application for fraud protection reasons in production use. That’s why I call these entry points “non-official”.
Last but not least, we have GUI drivers. In the graphic above I listed Selenium for example for web applications. For most major GUI frameworks usually, you can find a library in your programming language of choice that enables you to simulate button clicks, enter data into fields, and so on. so, when I find myself pressed to go through the GUI, I try to seek such a library for the technology at hand.
That’s also where patterns like the page object pattern come into play. In essence, the page object pattern asks you to model for each GUI page the interaction elements in a separate class. I’m not totally sure whether I would consider page objects in the above graphic as support code or part of the various drivers you use, but that would be my thought process behind that.
Some final thoughtsAvoid testing through GUI. If you have to, find solutions to remote control your user interface, and prepare to get rid of those mechanisms once you are able to fix the design and architecture of your application under test. I found the more convoluted support code I needed for automating tests, I heard my test automation tell me that the elements closer to the business rules really should be in your application under test, yielding a more ubiquitous language.
If you wonder why I would go such a route, I am heavily influenced by Craig Larman’s pattern of offering “protected variations”, a pattern I learned early on. You want to avoid having to change lots of support code or even examples in case some elements get shifted around on the production user interface. Sometimes I consider the thoughts behind the “anti-corruption layer” in the DDD community have similar reasoning.




November 26, 2021
Agile “What if”s
Stick around long enough in the nerd space, and you may come across the list of programming languages described as “what if”, i.e. “Java – What if everything was an object”. Maybe it’s the end of the year reflection period we find ourselves in, maybe it’s my brain working through food coma, but I can’t stop applying the general idea to some things in the Agile space right now, and have to get them down. I’m pretty sure, I crossed that idea at someplace else in the past few months, so here’s my take on the Agile “what if”s.
Disclaimer: This is going to be a list of totally unfair summaries – oftentimes underinformed ones. It’s intended as fun and taken with a grain of salt. If you feel offended by any of my descriptions, work on your humor, not this blog entry’s comment functionality.
Scrum: What if everything we worked on is a product?
Kanban: What if everything we worked on is to provide a service?
Extreme Programming: What if programmers were able to ship working products as often as possible?
Software Craftsmanship: What if we really invested in the education of our programmers?
Test-driven Development: What if everything we do can be motivated by a failing test?
Acceptance Test-driven Development: What if every feature is expressed with automatable tests?
Behavior-driven Development: What if we express our tests in a fluent language?
Agile Testing: What if every problem can be solved with a Whole Team approach?
Context-driven Testing: What if all testing we do is exploratory?
Event-sourcing: What if everything in our business domain happens on events?
CQRS: What if we optimize writing data and reading independently from each other?
DevOps: What if cross-functional includes our operations?
Kanban Flight Levels: What if every scaling problem can be solved on a higher level Kanban board?
Scrum @ Scale: What if every scaling problem can be solved by fractals?
Disciplined Agile Delivery: What if agile was an IBM process description?
Scaled Agile Framework:
– What if we throw everything associated with Agile together into one thing?
– What if all problems can be solved with a release train?
Nexus: What if every problem can be solved with a Nexus Integration Team?
Large-scale Scrum:
– What if every problem can be solved with feature teams?
– What if we take autonomous, cross-functional, self-managing teams to the extreme?
Lean Change Management: What if we change our organization iteratively and incrementally?
Agile Fluency: What if familiarizing with Agile is like learning a new language?
Human System Dynamics: What if our organization consists just of containers and interactions?
Sociocracy: What if our organization consists just of circles and roles?
Holacracy: What if our organization is run democratically?
Beta Kodex: What if all our problems stem from F.W. Taylor?
Systems Thinking: What if the world consists of multiple systems?
Complexity Thinking: What if the world is more complex than just systems of systems?
Co-active Coaching: What if we coach with the energy of the coachee?
Systemic Coaching: What if we make coachees aware of their surrounding systems?
ORSC: What if we fix all relationships around us?
Did I miss out anything? Feel free to add yours in the comments.








August 25, 2021
Fear of the mask
“1, 2, 1, 2, is this thing on? Alright, let’s go.”
(sung to Fear of the Dark by Iron Maiden)
I am a man who walks alone
And when I’m walking a dark road
At night or strolling through the park
When the wave begins to change
I sometimes feel a little strange
A little anxious when it’s asked
Fear of the mask
Fear of the mask
I have a constant fear that something’s always near
Fear of the vax
Fear of the vax
I have a phobia that someone’s always there
Have you run your body down the hall
And have you felt your neck skin crawl
When you’re searching for the sight?
Sometimes when you’re scared to take a breath
At the middle of the room
You’ve sensed that something’s on to you
Fear of the mask
Fear of the mask
I have a constant fear that something’s always near
Fear of the vax
Fear of the vax
I have a phobia that someone’s always there
Have you ever been alone at night
Thought you heard gasps behind
And turned around and no one’s there?
And as you quicken up your pace
You find it hard to breath again
Because you’re sure there’s someone there
Fear of the mask
Fear of the mask
I have a constant fear that something’s always near
Fear of the vax
Fear of the vax
I have a phobia that someone’s always there
Fear of the mask
Fear of the mask
Fear of the mask
Fear of the mask
Fear of the vax
Fear of the vax
Fear of the vax
Fear of the vax
Reading conspiracy theories the night before
Debating witches and folklore
The unknown troubles on your mind
Maybe your mind is playing tricks
You sense and suddenly eyes fix
On dancing shadows from behind
Fear of the mask
Fear of the mask
I have a constant fear that something’s always near
Fear of the vax
Fear of the vax
I have a phobia that someone’s always there
Fear of the mask
Fear of the mask
I have a constant fear that something’s always near
Fear of the vax
Fear of the vax
I have a phobia that someone’s always there
When I’m walking a dark road
I am a man who walks alone








July 6, 2021
Dear America
as a citizen of Germany all of my life and a past scholar of the German school system I have learned about the past of our mistakes in our history. The mistakes of my grandparents and great-grandparents and how Adolf Hitler came to power at some point in our history, leading to a collapse of the institutions I have known for good all my life.
The whole system started to fall apart based upon a lie, the lie that the Jewish people were to blame for all the suffering out there. Soon, the conversation shifted from blaming Jewish people to blaming other folks. Or in the words of Pastor Martin Niemöller:
First they came for the socialists, and I did not speak out—
Because I was not a socialist.
Then they came for the trade unionists, and I did not speak out—
Because I was not a trade unionist.
Then they came for the Jews, and I did not speak out—
Because I was not a Jew.
Then they came for me—and there was no one left to speak for me.
Or in the words of the past Gerald M. Weinberg:
If you solve problem no. 1, problem no. 2 gets a promotion.
Watching the events unfold in your country has bothered me for the past five years. The parallels are striking at times, even though you are foolish enough to do your own mistakes and neglect them as often as I find parallels.
The events that happened now half a year ago, exactly 6 months to the date of my publishing this blog entry, you should listen more to what history can teach you. I still see you promoting a lie so intense that can become the downfall of your society. I still see you promoting falsehoods for the good of a few, rather than taking into consideration the goodness of your people or humankind in total. I still see you dragging yourself into the end of the democratic experiment that started more than 200 years ago on a daily basis.
Please consider my words moving forward. Not necessarily for me, but mostly for you. While I believe that a stable America may help in (re-) building a more stable world overall, I fear for the outcomes of the alternative reality that I see you heading towards.
Kind regards
a concerned German.








June 15, 2021
Troubling vs. Nurturing Organizations
Just a few days ago I got an inspiration driving my intellectual curiosity to the point that I finally decided to write a blog entry about it. It’s been a long time since I wrote regularly here, so bare with me.
The source of the inspiration stems from Virginia Satir’s The New Peoplemaking book and my observations over the years that workplaces sometimes are put into family metaphors. That triggered a thought while reading from Satir about troubling vs. nurturing families to adopt her words to organizations. I will probably invite you to join in my thought experiment while I keep learning from Satir’s almost 50 years old work in the following blog entries – I hope.
In general, I assume I am not the first to take this analogy and adapt it to Satir’s work. Mostly I want to get my re-wording down to see what thoughts it will trigger for me personally. While digesting all of it, I don’t intend to add too much of my perspectives here, since I think Satir might have much more to add in upcoming chapters for me while I read along, and I don’t want to spoil me here.
As a side note, I am fully aware of the limitations of metaphors. That said, families and organizations in essence serve different purposes. While organizations in essence serve the purpose to earn money and build products or offer services, families make people and shape our current and future society. I fully recognize Satir’s higher potential her original words were meant to address.
Disclaimer end, let’s get into my adaption of Virginia Satir’s words.
Does it feel good to you to work in your organization right now?
Do you feel you are working with friends, people you like and trust, and who like and trust you?
Is it fun and exciting to be an employee in your organization?
If you can answer “yes” to these three questions, I am certain you are working in what I paraphrase a nurturing organization. If you answer “no” or “not often”, you probably work in an organization that is more or less troubled. This does not mean that you work for a bad company. It only means that people aren’t very happy and have not learned ways to love and value one another’s work openly.
I find that each organization can be placed somewhere along a scale from very nurturing to very troubled. I see many similarities in the way nurturing organizations operate. Troubled organizations, too, no matter what their problems, seem to have much in common. I would like to for you a word picture of these two types of organizations. Of course, neither picture will fit any specific organization exactly, but in one or the other you may recognize some part of your own organization in action.
Troubled organizationsThe atmosphere in a troubled organization is easy to feel. Whenever I am with such an organization, I quickly sense discomfort. Sometimes it feels cold, as if everyone were frozen; the atmosphere is extremely polite, and everyone is obviously bored or busy. Sometimes it feels as if everything were constantly spinning, like a top; I get dizzy and can’t find my balance. Or it may be an atmosphere of foreboding, like the lull before a storm, when thunder may crash and lightning strike at any moment. Sometimes the air is full of secrecy. Sometimes I feel very sad and cannot find an obvious reason. I realizes that’s because the sources are covered up.
In troubled organizations, people’s bodies and faces tell of their plight. Bodies are either stiff and tight, or slouchy. Faces look sullen, or sad, or blank like masks. Eyes look down and past people. Ears obviously don’t hear. Voices are either harsh and strident, or barely audible.
There is little evidence of friendship among individual employees, little joy in one another. The organization seems to stay together through duty, with people just trying to tolerate one another. now and then I see someone in a troubled organization make an effort at lightness, but the words fall with a thud. More often humor is caustic, sarcastic, even cruel. The seniors are so busy telling the juniors and each other what to do and what not to do that they never get to enjoy their work as contributing employees. It often comes as a great surprise to employees or troubled organizations that they actually can enjoy their work.
No one would intentionally pick this troubled way of working. Organizations accept it only because they know of no other way.
Nurturing organizationsHow different it is to work in a nurturing organization! Immediately, I can sense the aliveness, the genuineness, honesty, and pride of work. I feel the heart and soul present as well as the head. People demonstrate their love for work, their intellect, and their respect for life.
I feel that if I worked in such an organization, I would be listened to and would be interested in listening to others; I would be considered and would wish to consider others. I could openly show my affection as well as my pain and disapproval. I wouldn’t be afraid to take risks because everyone in my organization would realize that some mistakes are bound to come with my risk-taking – that my mistakes are a sign that I am growing. I would feel like a person in my own right – noticed, valued, loved, and clearly asked to notice, value, and love others. I would feel free to respond with humor and laughter when it fits.
One can actually see and hear the vitality in such an organization. The bodies are graceful, the facial expressions relaxed. People look at one another, not through one another or at the floor; and they speak in rich, clear voices. A flow and harmony permeate their relations with one another. The juniors, even as new hires, seem open and friendly, and the rest of the organizations treats them very much as persons.
The buildings in which these people work tend to have a lot of light and color. Clearly a place where people work, these buildings are planned for their comfort and enjoyment, not as showplaces for their competitors.
When there is quiet, it is a peaceful quiet, not the stillness of fear and caution. When there is noise, it is the sound of meaningful activity, not the thunder of trying to drown out everyone else. Each person seems to know that he or she will have the chance to be heard. If one’s turn doesn’t come now, it is only because there isn’t time – not because on isn’t valued for their work.
Employees of a nurturing organization feel free to tell each other how they feel. Anything can be talked about – the disappointments, fears, hurts, angers, criticisms, as well as the joys and achievements. If the CEO happens to be in a bad mood for some reason, her employees can say frankly, “Gee, Boss, you’re grouchy today.” The employee isn’t afraid that the CEO will bark back, “How dare you talk to your Boss that way!” Instead, the CEO can be frank, too: “I sure am grouchy. I had a terrible day today!”
Managers in nurturing organizations know that their employees are not intentionally bad. If someone behaves destructively, managers realize some misunderstanding has arise or someone’s self-esteem is dangerously low. They know people learn only when valuing themselves and feeling valued, so they don’t respond to behavior in a way that will make people feel devalued. Even when it is possible to change behavior by shaming or punishing, the resulting scar is not easily or quickly healed.
Eyeing solutionsFor the wrap-up, I will leave the direct rephrasing of Satir’s original words from here. In the chapter, I mostly quoted from verbatim (chapter 2, What’s your family like) she offers, in the end, the insight that she thinks that all families can become a nurturing one. Like her, I believe all organizations can become nurturing one. Every aspect of an organization that made it troubling has been learned and thus can be unlearned. That might take time and effort. Yet the question remains how?
To adopt Satir’s thoughts here:
First, you need to recognize that your organization sometimes is a troubled organization.
Second, you need to forgive yourself for past mistakes and give yourself permission to change, knowing that things can be different.
Third, make a decision to change things.
Fourth, take some action to start the process of change.
I look forward to learn more about families and maybe organizations in the chapters yet to come.








June 19, 2020
A tale of history
Disclaimer: The following story might be disturbing to some of you, especial if you happen to live in the United States of America right now. It’s more on the political side of things, rather than dealing with my more professional life. The sole reason for this is that I cannot keep my mouth (or blog for that matter) shut to the things that are happening around us today.
Hitler’s Signature
About nine years ago, my family bought a house that we hopefully will own directly at some point. It’s a rather old house, built in 1938, so I knew what we were setting up for when we made the deal. I knew I’d need to add new isolation, maybe new windows, and eventually replace the heating system that was roughly 20 years old at the time.
Step forward a few years, and it became clear we needed to replace the heating system. Not because it was failing, but because the chimney was getting wet to the point where the water came back into our living places. The chimney was pretty small, so a fix by a pipe was not an option. We didn’t have the means to buy a heating system right from our pockets, so I seeked to get a support program for replacing the old heating.
In Germany, that meant to get an assessment from an energy consultant. I made an appointment, brought the documents from the house construction with me, and let her dive through them. At one point, she called out: “Omg, the Führer signed this one.” And indeed, right on the first set of construction documents, there was Adolf Hitler’s signatory on it. I couldn’t believe it.
Then the consultant explained the circumstances to me. Back in 1937, the regime wanted to set up a military training ground in a village nearby. That military training ground still exists as of today. However, there was a small settlement of people in that area, so they relocated them. It turned out, that we bought one of the houses that were built for that matter. The houses left and right to ours have the same basic construction and were built for the same reason.
But this isn’t a story about our house or the neighbors’ houses.
Military training ground
There are public opening hours for the military training ground. As of today, German and British tank divisions use it for training purposes. At my first job, I found that the way to work was way more efficient when driving during public hours over that tank training ground rather than using the public roads around it, so I have been on that property a couple of times. You can still see the old village structures on there. And I will never forget the day when I found myself in my small car among 20 tanks, 10 in front of me, 10 behind, and got quite scared.
The German military base nearby isone of the largest – if not the largest – and according to Wikipedia, serves 4.300 soldiers. The British division is located closer to Paderborn in Paderborn-Sennelager, while the German troops are located in Augustdorf.

The name of the German barracks is indicated as “Gfm Rommel Kaserne” on road-signs, and I regularly drove by those signs for many years on my way to work. A few years back, I watched a piece on TV about Third Reich area military names still in use today. That’s when it clicked for me. General Field Marshal Rommel refers to no other person than Field Marshal Erwin Rommel, probably one of the most evil leaders during the Nazi regime in Germany.
My parents visited with us the close-by Nazi concentration camp in Bergen-Belsen, and I remember how sick that made me as a teenager to go through that part of our history. It’s a piece of our piece that I won’t deny, but also a piece of our past that I hoped would not exist. Back when I was in my 20s, my father consumed TV stations with the history of that area. At some point, he told me, that he was doing that because he never got to know any of that from his parents. They were outright silent on it, so as an adult he was still curious. Both my grandfathers served in World War II, and one of them even went into captivity in Stalingrad.
With all that in mind, I was disgusted to find out, the close-by barracks were named after such a leader from the Nazi regime, and even worse, the naming took place in 1961, several years after the Nazi regime had fallen. The name is controversial and has been debated for decades, according to . Personally, I think they should rename it, but it seems to be decided by our military leaders whether that’s going to happen.
But this is not a story of renaming the local military barracks.
What this story is about
Now, suppose chancellor Angela Merkel or President of Germany Frank-Walter Steinmeier were publicly announcing to keep the name of the military barracks to someone with a central role in the Nazi regime. A regime that killed several million people for reasons we consider outright wrong today. Don’t get me wrong, I think Field Marshal Rommel did do some achievements during his career. Is he worth remembering in this manner? I don’t think so.
Now, especially my American readers, go back to the moment where you read about me suggesting Angela Merkel would publicly announce to keep the name of the barracks, and your reaction to that. Go through this state of emotion one more time. How does your stomach feel? How does your throat feel like? What is going on in your mind?
This is the type of reaction that black Americans feel every day once they ride past a military barrack named after a military leader from your Civil War time. The is the feeling any non-white American has during an interview with your President when he puts renaming your military bases off the table. That is the feeling every black American has when being stopped by the American police force.
I don’t want to tell you what to do about it, as I think you probably already know.









June 20, 2018
What would you do?
Imagine you had an elder brother or sister in your family. (S)He is stronger than you, both physically, and trained in martial arts, and you have not. Recently (s)he started to behave weirdly. What would you do? When would you speak up?
You started to worry about your sibling for the first time, when you found your sister/brother reaching for your mother’s wallet, and taking out 200 Euros from her. Of course your mother eventually found out, and asked you whether you had taken money from her. You had told her that you didn’t do anything, but later overheard the same conversation between your sibling and your mother where your sister/brother told your mother, that (s)he suspected you of taking the money from you. This has been just the starting point of your worries, though.
What would you do? When would you speak up?
But that all just got your worries started. Quite recently your mother celebrated her 60th birthday, and had everybody invited over. Your sister/brother showed up, got into a fight with your uncle over him not offering his house for your sister’s/brother’s family, and left the birthday party early to “meet with friends” after having had a verbal conflict with almost any guest of your mother.
What would you do? When would you speak up?
Then your sister/brother got into a fight her/his significant other. You only heard parts of the verbal fight between them, but in general it appeared, that your sister/brother had a side-affair with someone else. Your brother-/sister-in-law was visibly furious, but your sister/brother denied all of it. Your in-law claimed (s)he had spoken to the side-affair in the supermarket, but from the overheard parts of the conversation, you couldn’t figure out what the problem was.
What would you do? When would you speak up?
Then lately, your sister/brother appeared to have a new group of friends, that clearly did not have the best influence on her/him. You noticed that by her/his statements at family celebrations. For example, over Christmas (s)he said that beating up your kids for educational purposes would be the right thing to do, and her/his rants about the new neighbors from a ethnic sub-group were devaluing the neighborhood and value of her/his estate.
What would you do? When would you speak up? When would you no longer invite your sister/brother to your birthday?
Then you heard this other thing. Your sister/brother is harassing co-workers to trade them their lunch boxes, or they wouldn’t get a raise. You happen to work for the same company, and you noticed that this left the atmosphere at work in a very weird state. Co-workers are talking about your sister/brother behind her/his back, and recently you even noticed co-workers shutting down their conversation even when you enter the room. Some co-worker you used to hang around with even had lots of excuses when you asked them whether they’d be open for some drinks in the bar later that night – and even few are actively avoiding any contact with you.
What would you do? When would you speak up? When would you no longer invite your sister/brother to your birthday?
And then quite recently there have been rumors about some weird stuff happening in your neighborhood. Some neighbor kids disappeared altogether and the worried parents hang flyers all around the neighborhood looking for their children. You could swear that you heard children’s cries and voices near your sister’s/brother’s home when you passed by it the last time, but you know (s)he does not have kids on her own. And then there was this one neighbor family where their child was finally found dead. The outcry of that family was heard for days, with neighbors sending thoughts, and prayers, and flowers. Just after the funeral ceremony, you saw a jacket with blood marks in one trashcan that just looked like the one your sister/brother used to wear in the past year. That picture just keeps on nagging on your mind, that (s)he might have something to do with all of this.
What would you do? When would you speak up? When would you no longer invite your sister/brother to your birthday?
Now, if you clicked on any of the links in the paragraphs, you may already have figured out that I’m not discussing a fictional family here, or a family at all. Usually I try to leave out political views on my personal blog, but decided lately to change that to start becoming more vocally about the things happening in the world around us.
This is a allegory about the things happening in the world that we get a slight insight through the news media. That said, your sister/brother in this allegory are the United States of America, and I urge to re-read the above text in this light whether you clicked on any link above or not, and review what is or might be happening, and answer the following questions:
What would you do? When would you speak up? When would you no longer invite your sister/brother to your birthday? When would you abandon your sister/brother completely?









August 1, 2016
Informed-consent workshop on LeSS with Craig Larman
A few months ago, I had the opportunity to join Craig Larman at a client for an informed-consent workshop on Large-scale Scrum (LeSS). Ever since I took his class in 2015, I was interested in how he starts off a LeSS adoption – or potential LeSS adoption, I should say. He asked me to do a write-up.
We had overall four days at the client. The first day was half Legacy TDD and half Impact Mapping. For day two and three we were off-site from the client with about 30 employees from different departments including finance and controlling, organizational development, and the CEO. The final fourth day we spent back at the client answering questions, and a three hours all-hands introduction to LeSS.
Contracting
Craig shared a google document with me, that he also shared with the client. There were a couple of things he made sure up-front, including a description of the company, questions from client to Craig, from Craig to client, and the invitation mail to the workshop participants among the motivation part for LeSS. That was interesting to me since I usually do that verbally or on the phone, whereas a shared document appeared straightforward to me.
Half-day Legacy TDD
On the first day, we spent the morning on some legacy code. We had about 10 developers joining us. Craig gave a short introduction to TDD and the difference to Legacy TDD. Then we worked in a mob with a rotation of a few minutes. In those four hours, we managed to write two tests for one of their legacy PHP classes. The first test appeared a bit daunting, but Craig also explained lots of things around dependencies, how to deal with them, differences between stubbing and mocking, etc., etc. It paid off for the second test, as we were able to write that faster since we already had some scaffolding from the first test in place.
Half-day Impact Mapping
In the afternoon, we spent another four hours with the product management group. Most of them were called Product Owner, but also the CEO and one of their Scrum Masters joined us. Craig explained the general approach and had the group identify a goal. Then the group worked through the impacted persons towards the impact that they needed to achieve there in order to get closer to the goal. We also mapped some of the deliverables that were already in their backlogs. At the end of the day, the group took a longer time to agree on a goal, so that we didn’t have time to actually estimate the impacts, and the deliverables, so that Craig explained the steps that were missing.
What strikes me about the first day was that Craig spent a day at gemba in a value-adding way. He worked with the programmers on their production code in the morning, and with the product group in the afternoon. In both cases, he was able to add value to different groups while getting an overview of how work is done at the client.
Workshop Day 1
In general I had a pretty good impression of the workshop. Craig led through the Thinking Tools behind LeSS. He started off with Occupational Psychology, and how fear hinders any adoption. We worked in great length through the different kinds of waste, queueing theory, and created Causal Loop Diagrams for a couple of dynamics that were the main motivation behind the elements in LeSS. Craig avoided to mention anything LeSS specific on day one. Instead he made the point for one backlog per product quite clear, in that the dynamic with more backlogs, i.e. one backlog per team, leads to sub-optimal identification with the customer. Compared to the course I took in February 2015, I found that the argumentation followed a clear line. Thus I could see the improvements to the material in action since then.
Workshop Day 2
On the second day, we dived deeper into LeSS with a short introduction on the framework as well as some adoption notes. We spent the second half of the second day with Craig’s deep dive into questions that had come up. Anyone who has attended Craig’s course probably knows what I’m talking about. Craig spent lots of time to get deep into the answer so that participants grasped the context of the answers and thoughts behind LeSS.
Day 3 Q&A and Informed Consent
On day 3 we spent the morning with other potential coaches and some volunteers back in the client’s office. We worked through some open questions, and then Craig urged the group to come up with next tiny steps to do before starting bigger changes in a month or two. He also ran an anonymous non-committing poll on whether the group wanted to go with LeSS. There were two objectors, eight in favor (iirc), and the majority of the group would go along, i.e. not resisting, but also not actively pushing forwards. Personally I think they identified way more next steps as I would have called suitable for the one or two months timeframe.
After that I had to leave for my train ride home, but Craig also did a whole company introduction to LeSS. I don’t know what happened there, though.
The overall goal of the four days was to make an informed decision at the client to either go for LeSS or something else. Craig made sure that the client made the decision where to go, and made sure that people in the workshop could understand potential side-effects. Together with the Causal Loop Diagrams they should be able now to evaluate their future struggles.









July 2, 2016
Data-driven tests in Junit5.0.0-SNAPSHOT
It’s been a while since I wrote code these days. Back in late April however I found myself in a Coding Dojo at the Düsseldorf Softwerkskammer meet-up working on the Mars Rover Kata. I have a story to share from that meeting. However, since I tried to reproduce the code we ended up with that night, and I decided to give JUnit5 (and Java8) a go for that, I ended up with a struggle.
Back in the days with JUnit4 I used the ParameterizedRunner quite often to use data-driven tests. I never remembered the signature of the @Parameters function, though. The Mars Rover Kata also includes some behavior that I wanted to run through a data-driven test, but how do you do that in JUnit5? I couldn’t find good answers for that on the Internet, so I decided to put my solution up here – probably for lots of critique.
Please note that I used JUnit 5.0.0-SNAPSHOT which is a later version than the alpha, but probably not the final one.
JUnit5 offers besides Java 8 capabilities some interesting new things. JUnit5 comes now with Extension capabilities where you may influence the test’s lifecycle and also ways to resolve parameters to your tests, and your test class constructors. And then there are TestFactories for DynamicTests. Woha, quite a lot new stuff.
First I tried stuff with parameter resolvers. But then I would have needed to keep track of the parameters, and I had to call the parameter resolver more than once. So, combining it with an extension might work? No, I couldn’t make that work. So, dynamic tests are the way to go.
So, here is an example for what I ended up with. We have a Direction class with a method called turnLeft(). The idea is if the Rover is headed NORTH, and turns left (by 90 degrees) then it will be facing WEST.
Some notes:
I kept a collection of test data in a field in line 17. This is somewhat similar to the old way you annotated a function with @Parameters in JUnit4, even though you can now get rid of the Object[], and use a private test data class per test class. That at least seems to be the solution that I preferred.
For the @TestFactory you have several possibilities. I decided to use the Stream return type here in line 28. As I haven’t programmed too much in Java 8, I am not sure whether my usage is appropriate here. The conversion of the testData from the Collection is quite straight-forward, I found.
For each operation I wrapped the assertion in line 36 to avoid making the call to dynamicTest more convoluted than necessary. I also decided to generate a descriptive string for each test with the method in line 32. I think you can come up with better ways to generate the test descriptions. Wrapping the assertion on seemed unavoidable though. I especially didn’t like the usage of the lambda-expression together with the aggregate expression seems to make the line with dynamicTest (line 29) less readable than I would like to. I think there is more improvement possible.
Note that you can have several @TestFactory methods on your test class. So when writing a test for turning right, you can provide another TestFactory and reuse the test data for that. I’ll leave that as an exercise for the inspired reader of my blog.
So, this is what I ended up with. I think there is still room for improvement, especially when you compare the result with stuff you might write in tools like Spock.
P.S.: I ran this through Marc Philipp – one of the JUnit5 originators – in an earlier version, and he told me that they will be working on a more elegant solution for data-driven tests, probably for one of the next releases of JUnit5.









June 16, 2016
State of Testing 2016 – My view
Usually I don’t write many promotions for other’s contents on this blog as I try to keep it personal and focused on my personal views. Recently I was contacted on the International 2016 State of Testing report, and whether I would like to do a write-up about it. I asked whether it would be ok to post a personal view, so here it is.
Demographics – and what do they tell me?
The top areas from the report are Europe (& Russia), USA, and India. I think these are also the biggest areas when it comes to software testing. The demographics tell me that the data according to my impressions is not very biased but well-spread.
About a third of the respondents work across four different locations. Another third work in a single location. My personal view on this is that there is a good mix of testers working in on location, and way more spread across different locations. I think this might stem from different out-sourcing companies as well as companies working across different sites for various reasons – even though this usually makes the formation of real teams hard – at least in my experience.
Most of the respondents have working experience of five years or more. I think the majority of testers new in the field usually don’t get immediately their attention on such kind of surveys. I think this is tragic, as in the long run we should be working on integrating people new to the field more easily.
There also appear many test managers in the survey data. This seems quite unusual to me, as there certainly are way more testers than test managers – I hope. This usually raises the question to me how come there are so few testers passionate about their craft. In some way this is tragic, but it resembles the state of the industry.
Interestingly on time management, most time of the testers seems to be spent on documentation (51%) and dealing with environments (49%). That’s sort of weird, but also resembles my experiences with more and more open source tools, and more and more programmers not really caring how their stuff can be tested or even brought to production. On the other hand I notice many problems with test data-centric automation approaches, where handling test data appears to be the biggest worry in many organization. I usually attribute that to bad automation, as an automated tests usually should be easy to deal with, and create its own test data set that it operates on – a problem well-addressed in the xUnit Test Patterns book in my opinion – but few people appear to know about that book.
Skills – and what you should look out for?
Which sort of transitions my picture to the skills section. Testers appear to use a couple of approaches, foremost Exploratory Testing with 87%. There are also 60% mentioning they use scripted testing. This also matches my experience since testing rarely is purely Exploratory or purely scripted. I think the majority of testers claiming they use Exploratory Testing is either a signal of the rise of context-driven testing in general, or a bias in the data. I think it’s more of the former.
I liked that test documentation gets leaner. With the former 51% of the spare time of testers spent with documentation, this is certainly a good thing. At the conferences I attend I see more and more sessions on how to use mindmaps for that. Quite a third of the respondents said they already used mindmaps. I think that’s a good signal.
Even though the authors claim that formal training is on the raise when it comes to skills of testers, and their respective education, there are still many testers trained through training on the job and mentoring, as well as learning from books and online resources. I think this is a good trend, since I doubt that formal training will be able to keep up with transferring skills in the long run. They can inspire testers to dive deeper into certain topics, but on-the-job training and mentoring, as well as active reflection from material that you read, is a good thing, and way more powerful.
Unsurprisingly communication skills are the number one necessary skills for testers (78%). The next skillset that a tester needs according to the survey is on functional testing and automation, web technologies, and general testing methodologies. That resembles sort of my past as a tester, and which skills I put efforts into. Unsurprisingly 86% of the respondents claimed that they have test automation in place.
More Agile – less concerned
It seems that waterfall approaches are on the decline, even in the testing world. In 2015 42% mentioned they used Waterfall. In 2016 it were only 39%. 82% responded they used Agile – maybe every once in a while.
Even though the testing community usually is concerned from the historic background on their job safety, this uprise of Agile methodologies didn’t lead to more testers being concerned. Compared to 2015 where 42% were not concerned about their job, in 2016 there are 53% of the folks unconcerned. Probably that might be related to more context-driven approaches being more wide-spread.
This is just a summary with certain picks from myself. I encourage to dive into the State of Testing survey report on your own to get more details.








