Can I run a specific testng test group via maven?

前端 未结 3 537
梦毁少年i
梦毁少年i 2020-12-15 03:53

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 e

3条回答
  •  Happy的楠姐
    2020-12-15 04:50

    You can include and exclude specific group during maven test execution.

    (1) Include Specific Groups

    mvn clean test -DincludeGroups=TestGroup1,TestGroup2
    

    (2) Exclude Specific Groups

    mvn clean test -DexcludeGroups=TestGroup3,TestGroup4
    

提交回复
热议问题