Questions tagged [maven-surefire-plugin]

The Surefire 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.

Maven Surefire Plugin is used during the test phase of the build lifecycle to execute the unit tests of an application.

It runs unit tests of a maven project and produces reports in text, XML and HTML format. By default, it will fail the build if the unit tests fail. It supports multiple unit test frameworks, notably JUnit and TestNG.

Its only goal is the test goal. Check its official usage page for a first sample.

1351 questions
0
votes
0 answers

Unable to load mojo plugin, A required class is missing

While running the MVN install for a module getting the below mentioned exception. In repository am having surefire 2.7.1, surefire-api 2.7.1 and surefire-booter…
user1919581
  • 481
  • 2
  • 14
  • 32
0
votes
0 answers

Junit + maven , Include test packages for parallel execution at runtime in pom.xml

I am able to do parallel execution by using org.apache.maven.plugins maven-surefire-plugin 2.15 classes
Vigneshwaran
  • 475
  • 3
  • 8
  • 15
0
votes
3 answers

Selenium tests Jacoco project coverage

I am running my selenium project module which isn't part of the main project, I run the selenium tests with Jacoco maven plugin and the surefire plugin, The Jacoco gives a code coverage (exec file) only of the selenium project and not for the whole…
frieman
  • 31
  • 2
  • 4
0
votes
1 answer

Eclipse searching for the wrong surefire dependency

On building my workspace, my Java 6 Maven project is marked with an error (a Maven problem): Could not calculate build plan: The repository system is offline but the artifact org.apache.maven.surefire:surefire:pom:2.7.1 is not available in the local…
H-H
  • 4,431
  • 6
  • 33
  • 41
0
votes
1 answer

Groovy: Antbuilder fileset is not created (launched from Jenkins)

I have following code in my script: def ant_fs = (new AntBuilder()) def fs = ant_fs.fileset( dir: ) fs.each{ println( "Fileset item: $it" ) } When I launch it from Maven (mvn ... in command line) or from Intellij IDEA I see that fileset…
zubactik
  • 1,297
  • 3
  • 19
  • 34
0
votes
0 answers

Jenkins builds failing while recording test results

We have Jenkins version 1.494 and Java 6. It is deployed on JBoss server. I was able to build the projects (using Maven 2) earlier but not sure what has changed and I am getting below error after the tests are run and when it tries to record test…
stack user1
  • 116
  • 1
  • 10
0
votes
1 answer

how to "debug as maven test" in eclipse (sts)

I have written test cases in JUnit and they are executing fine when I use run as - maven test. But although I put debug points and select debug as - maven test, debugging does not work. I use maven-surefire-plugin. I am running the test cases in…
TV Nath
  • 499
  • 5
  • 12
  • 35
0
votes
1 answer

Why does this autorun-cmd registry hack affect a java/maven process?

The presence of an HKEY_CURRENT_USER\Software\Microsoft\Command Processor\Autorun causes a java test to fail. Github repo to test this out : https://github.com/ajorpheus/final-frontier This is a follow-up question after this happened. Summary :…
Ashutosh Jindal
  • 18,501
  • 4
  • 62
  • 91
0
votes
1 answer

Powermock - @SupressStaticInitializationFor is not working

I have a class containing native methods and a static initializer which loads a dll and mocked it with powermock so that the the static initializer should be suppressed and the dll shouldn't be loaded. The class looks like this: class…
BeWu
  • 1,941
  • 1
  • 16
  • 22
0
votes
1 answer

In Hudson, when seeing the TestNG results, is there a way of displaying the parameters the test methods were run with?

I'm able to see the tests that were run, but I'm trying to display the parameters that were passed to them when using the testNG @Parameters annotation.
Jorge
  • 11
  • 1
0
votes
1 answer

Selenium java driver.close giving error to produce surefire reports

I am using selenium webdriver maven setup. So if I use driver.close() in code, I am getting error like below why it is can any one help on this. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test…
Raju
  • 137
  • 2
  • 4
  • 15
0
votes
1 answer

Mono "Hello World" example working, but Java is not

I'm running the Getting Started Examples from the Sauce Labs homepage both with Java and C# Mono. The Mono example works like a charm, but the Java one reports that Could not start a new session. Possible causes are invalid address of the remote…
BanksySan
  • 27,362
  • 33
  • 117
  • 216
0
votes
1 answer

Autowiring exception when using multiple context loaders in JUnit

I have created 2 classes A,B for JUnit, each has its own ContextLoaders for loading the application context. Now when I run each of these classes independently the JUnit test run fine. But when I do a maven build or run the JUnit on both of these…
pranky64
  • 437
  • 3
  • 18
0
votes
2 answers

pass a java parameter from jenkins -> maven -> testng

Our automated QA test cases are scheduled and executed by Jenkins. I have to run the test cases on different environments say UAT , STAGE and PROD (as they have different test data) and these test cases are 'grouped' as SANITY , REGRESSION and BATS.…
Girish
  • 1,981
  • 3
  • 17
  • 18
0
votes
1 answer

Maven build issues - can anyone help me in knowing why I see this error when I do run as maven install

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project resteasy: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test failed: Plugin…
iuser
  • 209
  • 1
  • 6
  • 18