Investigate the possibility of using the tool on test method level basis
pkremens opened this issue · 4 comments
Issue Overview
The tool allows user to work on test class level basis at the moment. Would it be even possible to work with the tool on method level basis (e.g. create a strategy which would execute only failed test methods, not all methods in a test class / ignore particular test methods without touching the code)?
In case of failure strategy, yes it might be easy to do it (it requires some investigation on how to deal with JUnit Surefire runner but it might be possible), in case of other strategies, it might be hard (but not impossible) to achieve it, basically because of the detection of test method changes.
So I think that as first step, adding this feature to failure strategy might be the best first approach.
Can be considered implementing test method in failure strategy valid acceptance criteria for this issue?
Another strategy suitable for this use-case is the categorized
one.
As for the surefire implementation - we should investigate how it is done when a list of test methods is set for a particular test class using system properties: http://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html then, we just extend the TestSelection
class and simulate the behavior.
@lordofthejars yes, that would be sufficient. Thank you.
@MatousJobanek Do you think that by default we should run just test methods by default or add an attribute which is false by default (so always runs past failed test classes) and you need to set to true
to just run at method level?