i've yet find answer in poms have:
<plugin> <groupid>org.scalatest</groupid> <artifactid>scalatest-maven-plugin</artifactid> <version>1.0</version> <configuration> <tagstoexclude> testtag </tagstoexclude> ...
and want way run tests tagged testtag. i've tried running
mvn test -dtagstoinclude=testtag
but because testtag excluded in poms, tests end being skipped. i've tried resetting pom properties:
mvn test -dtagstoexclude=none -dtagstoinclude=testtag
but overwriting doesn't work , of tests skipped yet again.
this works me, add profile tagstoexclude property:
<profiles> <profile> <id>default</id> <activation> <activebydefault>true</activebydefault> </activation> <properties> <tagstoexclude>testtag</tagstoexclude> </properties> </profile> </profiles> <plugin> <groupid>org.scalatest</groupid> <artifactid>scalatest-maven-plugin</artifactid> <version>1.0</version> <configuration> <tagstoexclude>${tagstoexclude}</tagstoexclude>
now can run command , works:
mvn test -dtagstoexclude=none -dtagstoinclude=testtag
reference: please see blog (i'm not author) https://technicaltesting.wordpress.com/tag/scalatest-maven-plugin/.
Comments
Post a Comment