maester
maester copied to clipboard
Compare to previous run
Having tests run automatically and the results being emailed over is great, however its hard to compare results, if we have X number of failures on a day then the next we have X+1 it would be great if the email report could say "you have 1 new failure {NAME}" so it is immediately flagged at the top of the message.
I know with GitHub Actions we can cache the test-results folder and keep using it (maybe need to clear old ones after a week) so that the previous run would be there to compare to.
I've often thought about this as well, some thoughts I have:
- It's hard to be a stateless framework like this is designed to be with this in place
- it would have to support any pipeline that runs this as well as once-off runs as well
- the framework already supports JSON file exports so arguably, another stateful mechanism could consume results and simply show runs and the difference between runs (maybe as an addition or add-on to this framework)?
Might be then that Maester needs a way for us to specify a global AfterAll (Not sure if pester can do this already) and then maybe a Add-MtEmailHeader cmdlet so we can add text to the email?
Yes it's a good suggestion. We need to find a way to get the previous run's results and pass it in for comparison.
Example from new cmdlet in PR
With the new release the Compare-MtTestResult cmdlet is working.