我可以通过Maven运行特定的Testng测试组吗? [英] Can I run a specific testng test group via maven?

查看:349
本文介绍了我可以通过Maven运行特定的Testng测试组吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个testng测试组,例如组1,组2,组3 ... 这些在我的pom.xml中定义,当我执行"mvn test"时所有这些都将运行.我需要执行什么操作才能仅执行一个组,而不必修改pom.xml中配置的组.

I have several testng test groups, e.g. group1,group2,group3... These are defined in my pom.xml and all get run when I execute "mvn test". What do I need to run to only execute one group without having to modify the groups configured in the pom.xml.

即mvn测试组2 mvn测试组1 mvn测试组3

i.e mvn test group2 mvn test group1 mvn test group3

推荐答案

尝试

mvn test -Dgroups=group3,group2

这篇关于我可以通过Maven运行特定的Testng测试组吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆