Skip to content
Luca Böhm edited this page Feb 5, 2024 · 27 revisions

Runtime Components Diagram

Design Documentation AMOS drawio

After installing our plugin, users will be able to configure mutation tests. This can be achieved by specifying values for verbosity, mutators, target tests and more in a separate window. In addition, buttons are provided within the code editor for initiating, re-running and stopping the execution of pitest runs.

For the plugin implementation, we've chosen the IntelliJ Platform Plugin SDK, which provides all the infrastructure IDEs need to support rich language tools. The SDK uses Java Swing for front-end development. The front-end components communicate with the back-end, which is implemented in Java/Kotlin, using Gradle. The choice of Java/Kotlin is based on the directory structure generated by the IntelliJ IDE plugin generator.

The user can start a PIT run either by clicking on the "Run" button in the IDE or by right clicking on an appropriate class/package in their project folder and selecting "Run PIT MutationMate".
This will send either the previously set run configuration or a default configuration to the override plugin, which will then start a PiTest run in the background.
This PItest run then triggers the third plugin, the coverage reporter, which generates two xml reports containing all the information gathered by pitest.
Our plugin then parses the generated report to show line coverage, mutation coverage and test strength. Passed tests are highlighted in green, while failed tests are highlighted in red. In addition, mutation test results for each line of code are presented as inline annotations.

Code Components Diagram

Code Component Diagram

The TestConfigurator allows users to configure and manage mutation test runs in the editor. Our plugin configures the test runs by running a Gradle task. This task triggers the Override plugin, which overwrites certain parts of the task and then triggers a new pitest run.
The coverage reporter plugin is triggered by pitest when it finishes. It now generates the xml files used later in the plugin.
The executor now gets feedback from the UPD server that pitest is finished. It now triggers the XML parser.
The XML parser extracts the necessary information, saves it for further processing and triggers the visualisation.

The results are now presented in the tool window.