Relative Content

Tag Archive for mavencucumberprofile

Maven profiles to run tests conditionally

I am currently trying to add profiles to a sub-module with maven. The purpose is to run a suite of cucumber tests but only in some circumstances (these are regression tests and we only want to run them when we build a release branch). I have written a profile in the pom of the module where the tests are. However, I cannot get the profile to activate. I’ve tried using the id of the profile in mvn clean test -Pcucumber and also using a property with mvn clean test -Dcucumber but it doesn’t work. Is there something I’m missing?