Can I run a specific testng test group via maven?
Try
mvn test -Dgroups=group3,group2
I came across this question while looking how to disable particular test group and Radadiya's answer confused me a bit.
To run particular groups use this, as mentioned by Eugene Kuleshov. docs
mvn test -Dgroups=group1,group2
But to exclude some group, use this (note excluded vs exclude). docs .
mvn test -DexcludedGroups=group3,group4