Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
TestNG Tests in the dogfooding repo giving error when trying to run with specified mode. #62
When executing TestNG tests in the dogfooding repo with Smart Testing provider, we get the following error,
Here's the related issue: https://gist.github.com/juherr/6eb3e93e2db33979b7e90b63ddadc888
Tests should execute as per the strategy and mode selected.
The output is as follows,
Steps To Reproduce
changed the title from
[Bug] TestNG Tests in the dogfooding repo giving error when trying to run with ordering mode.
TestNG Tests in the dogfooding repo giving error when trying to run with ordering mode.
Jul 18, 2017
@hemanik In order to unblock your work you can exclude this module from the embedded build for your tests, having configuration equivalent to
@MatousJobanek is there such an option in embedded mvn? Couldn't find it by quickly looking at the API.
Yeah, we pull - but it should pull only one provider, so it shouldn't happen that two providers are on classpath.
everything that is possible to set you can find here: https://github.com/shrinkwrap/resolver/blob/master/maven/api-maven-embedded/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/embedded/pom/equipped/ConfigurationStage.java
Hey I tried with for excluding submodule. We have to explicitly tell to use maven version > 3.2.1 using
@hemanik You can use exclude testng modules using following code
final BuiltProject build = embeddedMaven .useMaven3Version("3.3.9") .setProjects("!testng, !testng/core, !testng/container, !testng/standalone") .setGoals(goals) .setDebug(isMavenDebugOutputEnabled()) .setQuiet(disableQuietWhenAnyDebugModeEnabled() && quietMode) .skipTests(false) .setProperties(systemProperties) .ignoreFailure() .build();
@bartoszmajsak I have tested this, it's excluding modules if you set maven version > 3.2.1. No need to contribute to upstream as it's already there
Thanks for checking it out @dipak-pawar. I was thinking that maybe we could still have a method which has better meaning, for example
but if it works the way you described above we are good for the time being.
As for the failure itself - in short - it is a bug/shortcoming in Surefire plugin itself. I'll create an issue for it in Surefire and send a PR and link it here...