Track state and trend of your Java/JVM kata/dojo workflow.
This once will become a maven-central-hosted junit-extension. Until then the easiest way to use it is:
- Check out this project
- Start the
CounterDisplay
or theTimeSeriesChart
(or both) Do a kata and annotate your test class with@RedGreenTracking
<-- no more needed since in this project we use ServiceLoader for auto registering the extension- Do a kata and have fun :)
Heavily inspired by/based on ideas of Llewellyn Falco (the tracker: https://github.com/LearnWithLlew/ExtremeFakeItTillYouMakeIt.Java) and Nitsan Avni (the chart/graph https://github.com/nitsanavni/katas/tree/main/shortest-longest-red).
Seen at our first Samman Society Unconference at Vienna in 2024.
At the moment it consists of three parts:
- JUnit extension that sends the result of tests to a MQTT broker.
- Tracker that counts green/red. The UI code was copies from Llew but instead of reading from file it gets its values by subscribing to the mqtt broker. Also the UI plays the red/green sound files by itself, they also were included what Llew did.
- Graph that shows the red/green timeline and some statistics such as "longest time in red". The values are also retrieved by subscribing to the mqtt broker.
The UIs start and stop a MQTT broker within the JVM if there is no server running on port 1883 (default mqtt port)
...more to come
- If you run multiple tests, each result is published, so gren, red, green, green test results in four tests would count as as very short red phase
- If one of the UIs started the MQTT broker the broker will stop if this UI is stopped
- Write to File (as it used to be) so nothing gets lost even if no server is running
- If so: Write single filed for performance reasons (the extension would then not have to append data), that puts less stress on the short living extension
- Replace MQTT by HTTP (PUT and GET with long pollling (HTTP PUT shouldn't be slower than MQTT pub)
- We then could keep track of the states withing the HTTP server
- We can draw graphs there as well
- And we could add a control panel with reset, ... there