Programmatically Listen to Test Results (Incl. Hardware LED)saturday, april 08, 2023
To access the test results from your JUnit tests, you have to either read the output or parse result files (such as the XML surefire reports). It’s also possible to define JUnit result listeners programmatically. I’ve covered this in a previous blog post.
In this video, I’m showing how to set this up step-by-step, including accessing a hardware LED (powered by blink(1)) as “Extreme Feedback Device”. We will see how the LED light that Duke holds in his hands lights up in green or red, depending on our test results.
It’s especially interesting to see how well and quick that works to combine the result listeners with a development mode such as the one provided by Quarkus.
You find the topic of efficient testing interesting? Then you might want to have a look at my video course on effective enterprise testing.