karma-runner / maven-karma-plugin

Maven plugin for running tests using Karma.
Apache License 2.0
45 stars 26 forks source link

Adherence to skipTests #7

Closed jacobilsoe closed 11 years ago

jacobilsoe commented 11 years ago

It would be nice if maven-karma-plugin skipped running tests if the skipTests property was present. I know of the skipKarma property, but it would be useful if the plugin adhered to skipTests as well.

kelveden commented 11 years ago

Yes, I considered this when creating the skipKarma parameter.

The reason for a separate parameter is to ensure that tests run with the maven-surefire-plugin (i.e. typically Java unit tests) can be skipped in isolation to the karma tests. If support for skipTests were added to maven-karma-plugin then there would be no way to skip ONLY the surefire tests thus allowing the karma tests to run in isolation. Having said that, you could just achieve the same effect by running karma test. So perhaps the use case is a bit too obscure to be of concern.

I'll have a think...

jacobilsoe commented 11 years ago

Ok, I see. You could consider doing it the same way as the maven-failsafe-plugin (for running integration tests): http://maven.apache.org/surefire/maven-failsafe-plugin/examples/skipping-test.html

kelveden commented 11 years ago

Yeah, that's the approach I was considering. Have had a think about it and given that the scenario of wanting to skip unit tests but NOT karma is a bit obscure and there will be consistency with the failsafe plugin I'll add it in. Or you can submit a patch of course!

jacobilsoe commented 11 years ago

Great. Thanks.

synergiator commented 7 years ago

Hi - since 2013 that Maven Failsaife Plugin url has moved to http://maven.apache.org/surefire/maven-failsafe-plugin/examples/skipping-tests.html

@kelveden - how to use properly "skipKarma" from Maven command line?

Not working e.g. mvn clean install -DskipKarma=true mvn clean install -Dmaven.skipKarma=true

shravank28 commented 4 years ago

Try this: mvn clean install -Dskip.karma=true