问题
We have a vast amount of tests. We would like infinitest only to choose between tests that have been included in an .xml-file (i.e. a TestNG suite).
We do not want to put the annotation groups = { "shouldbetested" }
in every testcase but rather feed the info from our .xml file into infinitest.
Is this possible?
Is it another tool that could do that for us?
回答1:
you can use a regular expresstion to "not" skip a certain test:
(?!.*YourTest)
回答2:
Infinitest can filter out the tests you don't want to run using regular expressions in the infinitest.filters
file.
The infinitest.filters contains regular expressions (one per line) that match the test classes you want to filter. Put this file in the root of your project (a.k.a. the working directory), and Infinitest will filter those tests out.
Note that the class names include package names, so use .*
in front to match any package.
来源:https://stackoverflow.com/questions/8518552/is-it-possible-to-specify-which-tests-to-choose-from