Hello everyone! Second stage of GSoC has ended and for this project we have a new version of DrTests with new features and improved UI.
DrTests UI new features:
- Different views for results
- Extra commands on items
- Enhanced UI
Dealing with different views
Since we need to display different information for the result we decided working with TreeTable and pragmas (we are using spec newest version).
A TreeTable allow us to display multivariate information. For example we can group the results by the type of result(passed, failure, error or skipped) or aditionaly by classes.
In the image we can see 2 ways of showing the same result:
- The one in the left is grouped by type of result and class.
- The one in the right only by type of result.
So using a Tree is useful when the results are not plain and could contain extra information.
Aditionally we use pragmas to manage different displays.
Pragmas in Pharo are annotations on CompiledMethods. They are used to attach additional properties to the methods to make those methods easily collectable through reflectivity and to ease the creation of special handlings.
The way we define a pragma is adding a line <> to a method.
<dTTestRunnerResultTreeNamed: 'Grouped by type of result'>
There is a pragma por each method that builds the tree for the UI.
We will collect this pragmas in a combo box to select the way the result will be displayed.
If you want to now more about pragmas you can read about it on pharo wiki.
Aditional Commands on Result
This new version has extra commands on items that allow us to:
- Re-run Failures/Errors only
- Debug/Re-run a single test
- Browse the item result
- Filter packages by name
To manage this menu in the items we are working with commander2.
We can define a different menu depending if the selected item is a group or a a single test.
Now, each plugin can also define diferent commands for it’s result.
For example in DrTests-TestsRunner package we have the next commands.
Then you need to build the menu in the plugin with all the commands, in this case DTTestRunner .
To understand better, in Pharo 8.0 there is an example in Spec2-Commander2-ContactBook package in the class side of SpContactBookPresenter.
Enhanced UI - Mini DrTests
The goal for MiniDrTests is having a little window to execute tests fast and have an inmediate feedback.
Not all the plugins are allowed to switch to this mini UI. The configuration that makes this miniDrTests works is defined in the main UI (packages, clases selected, etc) .
The color feedback uses 3 colors:
- Green: All tests passed
- Yellow: One or more failures
- Red: One or more errors, may include failures
DrTests video demo
Finally, we presented DrTests as a tool in IWST applications papers for ESUG 2019 and there will be a short presentation about it.
I am sure I will meet a lot of interesting people and It will be an incredible experience.
I hope see you there!