Is it possible to specify which tests to choose from?

拈花ヽ惹草 提交于 2019-12-05 01:03:20

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!