Menu
  • HOME
  • TAGS

TestNg reporter information repeated in surefire test results output

java,maven,jenkins,testng,maven-surefire-plugin

I've worked out what was happening here in case anyone stumbles across this in future. It looks like every time there was a failure, and the override was called, it was called for every instance that existed. For example if the @Listeners tag existed in 3 classes, the output would...

maven surefire test failed after upgrade to JDK 8

maven,java-8,maven-surefire-plugin

The Cobertura Maven plugin needs to be updated to version 2.7 to support Java 8. See: http://jira.codehaus.org/browse/MCOBERTURA-189...

maven surefire plugin does not inject system properties

java,maven,surefire,maven-surefire-plugin

My bad, plugin was in a different module that test

Regression report in Maven surefire-report on local box?

maven,jenkins,surefire,maven-surefire-plugin

It's not there and I wonder if it will be supported by the mavne-surefire-plugin. Maven doesn't keep track of historic statistics, it just builds (that's its main scope). If you want such statistics, you probably need some other tool like Jenkins or maybe SonarQube

Maven sure-fire plugin is not running second test class for the same original class

java,maven,junit,maven-surefire-plugin

The reason is that the plugin uses class names convention in order to identify test classes. You should change the second class name to something like OriginalTestClassNotParameterizedTest or TestOriginalTestClassNotParameterized See test goal includes parameter for more...

@BeforeSuite not invoked when testing a single class

java,unit-testing,testng,maven-surefire-plugin

Your @BeforeSuite and @Test are in different classes. When you run a single class, testng generates a default suite.xml with only one class in it. Hence your @BeforeSuite is not visible to testng. You can either extend MySuiteClass in your testclass or create a suite file and run the suite...

Is there a way to specify in Maven which JUnit tests run by package

java,maven,junit,surefire,maven-surefire-plugin

Yes you can configure surefire plugin to include certain tests only <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.17</version> <configuration> <includes> <include>com/abc/*Test.java</include> </includes> </configuration> </plugin> </plugins> </build>...

Maven surefire - making dependency between tests

java,unit-testing,maven,junit,maven-surefire-plugin

JUnit has an annotation @FixMethodOrder to execute test methods in a given class in declaration order or in alphabetical order. Surefire has a property runOrder to start test classes in a given order, e.g. alphabetically....

Test broken on jenkins but running locally

linux,jenkins,maven-surefire-plugin

It was an ussue with cobertura itself (-Dcobertura.test=true). Activating it resolved the Problem.

How to debug maven surefire tests in Eclipse

java,maven,debugging,maven-surefire-plugin

As already mentioned by khmarbaise, ditch the maven part and just run the tests from eclipse itself. The Key-Combination you'll want to use after selecting the package containing your TestNG tests is: Alt + Shift + D, N To debug JUnitTests, replace the N by T As to preserving current...

Javaagent path not well interpreted on maven/linux/tomcat

java,linux,maven,urlencode,maven-surefire-plugin

Ok, it was an encoding problem on my linux: X13... instead of UTF-8. I see Green buttons now :D...

mvn integration-test command pulls in unwanted unit tests for execution

maven,maven-plugin,maven-surefire-plugin,maven-failsafe-plugin

The maven-surefire-plugin is part of the lifecycle, which is always bound to the test-phase for Java projects. Calling integration-test means that all lifecycle-phases up to the integration-test phase are executed. So the MyUnitTest will always be executed (which is a good thing). Your includes/excludes have no effect, these are already...

maven surefire: how to print current test being run?

java,maven,surefire,maven-surefire-plugin

It's a bit of stretch, but you could implement a RunListener and add it to surefire. See how to configure it here.

maven-surefire-report-plugin does not build HTML report

maven,selenium,junit,surefire,maven-surefire-plugin

The call to the maven-surefire-report-plugin in the reporting section of the POM is missing. Please have a look at http://maven.apache.org/surefire/maven-surefire-report-plugin/usage.html

How to setup Maven POM file with System Properties to inpurt parameters in Java?

java,maven,surefire,maven-surefire-plugin

if you want to pass System properties to your test cases, which are invoked by surefire plugin you need to configure surefire plugin to pass properties like <project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.17</version> <configuration> <systemPropertyVariables> <number1>1</number1> <number2>2</number2> </systemPropertyVariables>...