Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须根据 testng.xml 中的组运行测试。以及哪个测试组必须包括想要使用 ant 给予。
例如。
<test name="Test1" preserve-order="true"> <groups> <run> <include name="Group1"/> <include name="Group2"/> </run> </groups> </test>
在这里我想输入 Group1 然后只有 Group1 应该运行。
如何做到这一点?请帮我。谢谢
如果您使用的是TestNG Ant 插件,您可以直接将组指定为属性:
groups :要运行的组列表,以空格或逗号分隔。