Questions tagged [surefire]

The Surefire Maven Plugin is used during the test phase of the build lifecycle to execute the unit tests of an application. It is commonly used in continuous integration.

The Surefire Plugin is used during the test phase of the build lifecycle to execute the unit tests of an application. It generates reports in two different file formats:

Plain text files (.txt)
XML files (
.xml)

By default, these files are generated at ${basedir}/target/surefire-reports.

The Surefire Plugin has only one goal:

surefire:test

runs the unit tests of an application.

Related tags :

278 questions
5
votes
3 answers

mvn test java.lang.OutOfMemoryError: unable to create new native thread

When I run mvn test I receive the below exception. I have tried both raising and lowering my Xmx and Xss JVM settings and bumping all limits under ulimit. There are about 1300 tests and the last 200 always fail with this exception. Running those…
Brad
  • 5,428
  • 1
  • 33
  • 56
5
votes
1 answer

Is there a way to force Maven Surefire or JUnit to indicate the name of the failing test class when executed from a Test Suite?

My question: Is there a way to force Maven Surefire (or JUnit?) to indicate the name of the failing test class when this class has been executed from a Test Suite? Now, the long story. Imagine you have a JUnit test suite that launches two JUnit…
Romain Linsolas
  • 79,475
  • 49
  • 202
  • 273
5
votes
0 answers

Unable to force newer version of surefire-plugin in Maven

I have a maven project and I am using the surefire-plugin to run my tests. Previously, I didn't force any version and maven picked up the 2.4.3 for me (why ??). I want to use 2.7.2 instead, which has better support for JUnit4 (especially…
Raphael Jolivet
  • 3,940
  • 5
  • 36
  • 56
5
votes
0 answers

Surefire: don't create /tmp/stdout*deferred

Since SUREFIRE-938 the output of test is buffered in /tmp/stdout*deferred in order to create XML report. I am not interested in the report in XML or any other form, but I gather gigabytes of logs during the test executions, and write them to /tmp,…
Radim Vansa
  • 5,686
  • 2
  • 25
  • 40
5
votes
2 answers

Maven Surefire Junit test suite

I am using the Maven Surefire plugin in order to run just a specific suite of tests. For instance: package suite; import org.junit.runner.RunWith; import org.junit.runners.Suite; import suite.slow.EvenSlowerClassTest; import…
luca.p.alexandru
  • 1,660
  • 5
  • 23
  • 42
5
votes
2 answers

Mockito, jacoco and surefire causes out of memory

I am using mockito 1.8.3, jacoco 0.72 and maven 3.0.5 surefire plugin (2.12.4) to execute unit test and generating coverage report, it was working fine. With more and more tests are added, it starts not working. I continuously encounter out of…
Skywolf
  • 683
  • 10
  • 21
5
votes
1 answer

Is there a existing way to generate surefire reports with simple-build-tool?

I'm working on a project using Scala running Selenium tests as part of a continuous integration process. Hudson displays very helpful information based on the results in the surefire reports but I would much prefer using sbt to Maven. Is there an…
Bryan J Swift
  • 1,449
  • 2
  • 15
  • 17
5
votes
1 answer

How to run maven jar file using surefire plugin?

I have created a maven project for testing my application. I have used Webdriver, TestNG framework in my projet. I have used maven surefire plugin and reporty-ng plugin to generate report for the test cases. This works fine when I run within IDE (…
5
votes
2 answers

How to tell Sonar to use my surefire reports for unit test results

We have a Jenkins job that contains a bunch of javascript files. We build our project via grunt, and at the end of the build we run JSCover to run our unit tests and collect code coverage. It all works. We get a nice LCOV file, and we get a bunch of…
grayaii
  • 2,241
  • 7
  • 31
  • 47
5
votes
3 answers

Why is Maven failing with a SurefireExecutionException: > Cannot set option parallel with value

Hi I am working through the tutorial here using windows XP and latest builds http://binil.wordpress.com/2006/12/08/automated-smoke-tests-with-selenium-cargo-testng-and-maven/ Could someone please tell me what the tags…
Ric
  • 89
  • 1
  • 2
  • 5
5
votes
1 answer

Maven: surefire plugin ignores -Dgroups when is already configured

My project has a few JUnit tests that I rarely want to run. To do so I put them in a @Category and then I did this: maven-surefire-plugin
AndrewBourgeois
  • 2,634
  • 7
  • 41
  • 58
5
votes
1 answer

Maven Eclipse unit test configuration

I use Eclipse and for some of my unit tests, I need to set some JVM args for the test to work, -Djava.library.path in particular. I set it in my POM file as follows: org.apache.maven.plugins
Jeff Storey
  • 56,312
  • 72
  • 233
  • 406
5
votes
3 answers

maven: Running the same tests for different configurations

In my spring + maven app, I have created some tests for the Data Access Layer that I would like now to run against multiple datasources. I have something…
jfu
  • 71
  • 3
4
votes
2 answers

Running JUnit 4 Tests Parallel With FailSafe & SureFire plugins

We have a profile created in maven to run our Selenium junit4 type tests and below is the snippet of it without the executions tag. selenium-tests
raksja
  • 3,969
  • 5
  • 38
  • 44
4
votes
1 answer

Debugging maven tests with netbeans 6.9.1?

I have a maven project in netbeans 6.9.1, in there a junit 4.4 test class. In netbeans context menu I can "clean and build" my project and in output I can see, that my test class was found and run by surefire. Now I choose from context menu "debug…