Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-25356

hudson.tasks.junit.AbortException while using maven.test.skip

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None
    • Jenkins: 1.5.6.3
      Maven-Plugin: 2.7
      OS: Linux
      Java: 7

      Running a multimodule build with the following parameters

      mvn clean install -Dmaven.test.skip=true
      

      will cause

      [INFO] --- jasmine-maven-plugin:1.3.1.4:test (default) @ lh-ress-ui ---
      [INFO] Skipping Jasmine Specs
      [JENKINS] Zeichne Testergebnisse auf
      hudson.AbortException: Test reports were found but none of them are new. Did tests run? 
      For example, /home/jenkinslocal/jenkins-jobs/workspace/lufthansa-reactor-master-SNAPSHOT-NEW/lufthansa-ress-ui/target/jasmine/TEST-jasmine.xml is 44 Jahre old
      
      	at hudson.tasks.junit.TestResult.parse(TestResult.java:213)
      	at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:148)
      	at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:628)
      	at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:610)
      	at hudson.maven.Maven3Builder$JenkinsEventSpy.onEvent(Maven3Builder.java:306)
      	at org.apache.maven.eventspy.internal.EventSpyDispatcher.onEvent(EventSpyDispatcher.java:108)
      	at org.apache.maven.eventspy.internal.EventSpyExecutionListener.mojoSucceeded(EventSpyExecutionListener.java:131)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:227)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
      	at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
      	at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:328)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      [INFO]
      

      If setting

      -DskipTests=true
      

      is added, everything works normal but then also the unit tests will not be executed.

          [JENKINS-25356] hudson.tasks.junit.AbortException while using maven.test.skip

          Frank Mueller added a comment - - edited

          First I reopened the Ticket JENKINS-751. But danielbeck told me to open a new one.

          Frank Mueller added a comment - - edited First I reopened the Ticket JENKINS-751 . But danielbeck told me to open a new one.

          Frank Mueller added a comment -

          Found it...

          File:
          src/main/java/hudson/maven/reporters/SurefireArchiver.java

          Line 316

          Old Content

          String[] skipProperties = {"skip", "skipExec", "skipTests", "skipTest"};
          

          New Content (added mvnTestSkip):

          String[] skipProperties = {"skip", "skipExec", "skipTests", "skipTest", "mvnTestSkip"};
          

          Works for me as it realize if jasmine is deactivated.
          Sorry for not providing a patch. I played around a little and have to much changes.

          Frank Mueller added a comment - Found it... File: src/main/java/hudson/maven/reporters/SurefireArchiver.java Line 316 Old Content String [] skipProperties = { "skip" , "skipExec" , "skipTests" , "skipTest" }; New Content (added mvnTestSkip): String [] skipProperties = { "skip" , "skipExec" , "skipTests" , "skipTest" , "mvnTestSkip" }; Works for me as it realize if jasmine is deactivated. Sorry for not providing a patch. I played around a little and have to much changes.

          Nicholas Wertzberger added a comment - - edited

          Also having this issue. Running Java 8 + Jenkins 1.586 on RHEL 6

              [JENKINS] Recording test results
              hudson.AbortException: Test reports were found but none of them are new. Did tests run? 
              For example, /home/djbs002/.jenkins/jobs/SGI Web Console/workspace/target/jasmine/TEST-jasmine.xml is 44 yr old
          
          	at hudson.tasks.junit.TestResult.parse(TestResult.java:213)
          	at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:148)
          	at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:634)
          	at hudson.maven.Maven3Builder$MavenExecutionListener.forkSucceeded(Maven3Builder.java:700)
          	at hudson.maven.Maven3Builder$JenkinsEventSpy.onEvent(Maven3Builder.java:31)
          

          This is even happening when i do run Jasmine tests, as can be seen below, these tests did not run 44 yr ago:

              total 165
              -rw-r--r-- 1 djbs002 jbsgrp 79943 Oct 29 20:06 FIREFOX_3-ManualSpecRunner.html
              -rw-r--r-- 1 djbs002 jbsgrp 80171 Oct 29 20:06 FIREFOX_3-SpecRunner.html
              drwxr-xr-x 8 djbs002 jbsgrp  1024 Jul 30 10:39 js
              drwxr-xr-x 6 djbs002 jbsgrp  1024 Jul 30 10:39 spec
              -rw-r--r-- 1 djbs002 jbsgrp  5069 Oct 29 20:06 TEST-jasmine.xml
          

          Nicholas Wertzberger added a comment - - edited Also having this issue. Running Java 8 + Jenkins 1.586 on RHEL 6 [JENKINS] Recording test results hudson.AbortException: Test reports were found but none of them are new . Did tests run? For example, /home/djbs002/.jenkins/jobs/SGI Web Console/workspace/target/jasmine/TEST-jasmine.xml is 44 yr old at hudson.tasks.junit.TestResult.parse(TestResult.java:213) at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:148) at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:634) at hudson.maven.Maven3Builder$MavenExecutionListener.forkSucceeded(Maven3Builder.java:700) at hudson.maven.Maven3Builder$JenkinsEventSpy.onEvent(Maven3Builder.java:31) This is even happening when i do run Jasmine tests, as can be seen below, these tests did not run 44 yr ago: total 165 -rw-r--r-- 1 djbs002 jbsgrp 79943 Oct 29 20:06 FIREFOX_3-ManualSpecRunner.html -rw-r--r-- 1 djbs002 jbsgrp 80171 Oct 29 20:06 FIREFOX_3-SpecRunner.html drwxr-xr-x 8 djbs002 jbsgrp 1024 Jul 30 10:39 js drwxr-xr-x 6 djbs002 jbsgrp 1024 Jul 30 10:39 spec -rw-r--r-- 1 djbs002 jbsgrp 5069 Oct 29 20:06 TEST-jasmine.xml

          Krishna Kumar added a comment -

          Hi,

          We are facing same issue here with build getting red with the following exception
          [JENKINS] Recording test results
          hudson.AbortException: Test reports were found but none of them are new. Did tests run?

          We are using Jenkins version 1.591

          Any workaround for this?

          Krishna Kumar added a comment - Hi, We are facing same issue here with build getting red with the following exception [JENKINS] Recording test results hudson.AbortException: Test reports were found but none of them are new. Did tests run? We are using Jenkins version 1.591 Any workaround for this?

          Krishna Kumar added a comment -

          Upgrading jasmine-maven-plugin made it work for me.

          Krishna Kumar added a comment - Upgrading jasmine-maven-plugin made it work for me.

          James Perrin added a comment -

          I'm also getting this, using jasmine-maven-plugin v2.0 and jenkins' maven plugin v2.14

          James Perrin added a comment - I'm also getting this, using jasmine-maven-plugin v2.0 and jenkins' maven plugin v2.14

            Unassigned Unassigned
            fmueller Frank Mueller
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: