null pointer when using TestNG in a matrix plugin

24 views
Skip to first unread message

Brian Mingus

unread,
Sep 26, 2013, 6:34:08 PM9/26/13
to jenkins...@googlegroups.com
Hi,

I am running Jenkins 1.532 and TestNG Results Plugin 1.5. 

I have a job with a Publish TestNG Results Post-build Action where the TestNG XML report pattern is **/*/testng-results.xml and this works fine.

I am migrating to a matrix job and I now have the Any Build Step Plugin and Conditional Plugin installed. Together these allow me to call the TestNG post-build step as a build step. i.e.,

- Build
  - Conditional Steps (multiple)
    - Run? (Or)
      - ...
      - Steps to run if condition is met
        - Archive the artifacts
        - Publish TestNG Results

This results in the following stack trace:

00:16:16.366 Strings match run condition: string 1=[win], string 2=[mac]
00:16:16.450 Strings match run condition: string 1=[win], string 2=[win]
00:16:16.450 Run condition [Or] enabling perform for step [BuilderChain]
00:16:16.450 Archiving artifacts
00:16:19.977 FATAL: null
00:16:19.977 java.lang.NullPointerException
00:16:19.977   at hudson.plugins.testng.Publisher.perform(Publisher.java:80)
00:16:19.977 	at org.jenkinsci.plugins.conditionalbuildstep.BuilderChain.perform(BuilderChain.java:71)
00:16:19.977 	at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110)
00:16:19.977 	at org.jenkins_ci.plugins.run_condition.BuildStepRunner$DontRun.conditionalRun(BuildStepRunner.java:264)
00:16:19.977 	at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)
00:16:19.977 	at org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuilder.perform(ConditionalBuilder.java:133)
00:16:19.977 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
00:16:19.977 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
00:16:19.977 	at hudson.model.Build$BuildExecution.build(Build.java:199)
00:16:19.977 	at hudson.model.Build$BuildExecution.doRun(Build.java:160)
00:16:19.977 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:567)
00:16:19.977 	at hudson.model.Run.execute(Run.java:1665)
00:16:19.977 	at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
00:16:19.977 	at hudson.model.ResourceController.execute(ResourceController.java:88)
00:16:19.977 	at hudson.model.Executor.run(Executor.java:246)

I've noticed that this is similar to the following issue:

https://issues.jenkins-ci.org/browse/JENKINS-11717

I have checked the encoding of the xml as per that bug report and that is not the problem, although I knew that because it works in the non-matrix job.

This error seems to be due either to the matrix job, or the Any Build Step plugin.

I will investigate more tomorrow. In the meantime, if anyone has any input on this issue I would appreciate it.

Brian
Reply all
Reply to author
Forward
0 new messages