I would like to instrument SUnit tests in Pharo. What is the proper way to change how tests are run?
Example:
I want to introduce a timeout to tests, each test I run should be aborted after a given delay.
Problem:
SUnit does not feature a dedicated TestRunner
in the model that would allow me to introduce changes easily. I can create a new subclass of TestResult
and use the API there (runCase:
, addError:
...) to get the enough control. However it feels strange to change the result class to modify the behavior on how tests are run.
I am used to SMark where I have a dedicated runner to modify these things.