A test automation library based on common other best practice open source libraries. It adds missing functionalities but does not reinvent the wheel. Just glues stuff together nicely and adds some sprinkles.
MIT License
80
stars
11
forks
source link
#179 Filter test methods for execution by regex from configuration file #186
The changes in NeodymiumRunner.computeTestMethods are meant to filter the test methods by applying the regex from the neodymium.testExecutionRegex on the already generated method description.
To avoid redundant error message for the tests, which should not be executed, the validateInstanceMethods of BlockJUnit4ClassRunner was overridden to ignore the test classes with no runnable methods if the neodymium.testExecutionRegex is configured.
The feature allows to filter test cases for execution via neodymium property like the following:
neodymium.testExecutionRegex=".*LoginTest#testLoginWithPasswordFailure\s::\swrong\spassword.*"
( This is not obligatory to mention all the parts of the test description. If you don't want to specify the part, simply replace it with .*)
More useful, however, might be passing this property for specific maven profile like here:
The changes in
NeodymiumRunner.computeTestMethods
are meant to filter the test methods by applying the regex from theneodymium.testExecutionRegex
on the already generated method description.To avoid redundant error message for the tests, which should not be executed, the
validateInstanceMethods
ofBlockJUnit4ClassRunner
was overridden to ignore the test classes with no runnable methods if theneodymium.testExecutionRegex
is configured.The feature allows to filter test cases for execution via neodymium property like the following:
neodymium.testExecutionRegex=".*LoginTest#testLoginWithPasswordFailure\s::\swrong\spassword.*"
( This is not obligatory to mention all the parts of the test description. If you don't want to specify the part, simply replace it with.*
)More useful, however, might be passing this property for specific maven profile like here: