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

NullPointerException at org.jenkinsci.plugins.MsTestBuilder.perform(MsTestBuilder.java:144)

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I got this error in the console if I try to build a .Net project. The build itself (with msbuild) works

      Path To MSTest.exe: mstest.exe
      Result file was not found so no action has been taken. file:/C:/Program%20Files%20(x86)/Jenkins/jobs/UsageStatistic%20Test/workspace/testresult.trx
      FATAL: null
      java.lang.NullPointerException
      at org.jenkinsci.plugins.MsTestBuilder.perform(MsTestBuilder.java:144)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      at hudson.model.Build$BuildExecution.build(Build.java:198)
      at hudson.model.Build$BuildExecution.doRun(Build.java:159)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:523)
      at hudson.model.Run.execute(Run.java:1700)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:231)

        Attachments

          Activity

          Hide
          ido_ran Ido Ran added a comment -

          Is this issue still relevant?

          Show
          ido_ran Ido Ran added a comment - Is this issue still relevant?
          Hide
          dzolee Zoltan D added a comment - - edited

          Sadly, yes. Others had this problem as well ...
          http://stackoverflow.com/questions/21112717/error-trying-to-run-mstest-on-jenkins

          I am getting a similar error:

          Path To MSTest.exe: mstest.exe
          Result file was not found so no action has been taken. file:/D:/Jenkins/jobs/BX%20AQM%20-%20Tests/workspace/products/BX/AQM_mstest.trx
          FATAL: null
          java.lang.NullPointerException
          at org.jenkinsci.plugins.MsTestBuilder.perform(MsTestBuilder.java:144)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
          at hudson.model.Build$BuildExecution.build(Build.java:199)
          at hudson.model.Build$BuildExecution.doRun(Build.java:160)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:585)
          at hudson.model.Run.execute(Run.java:1676)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:231)

          Could this be a file permission problem on Win2012?
          If I pop up a cmd prompt on the Jenkins machine (which has VS2010 installed), then the test run fails:
          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>mstest /testcontainer:"D:
          \Jenkins\jobs\BX Tests\workspace\products\BX\Test.dll"
          Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1
          Copyright (c) Microsoft Corporation. All rights reserved.

          Loading D:\Jenkins\jobs\BX Tests\workspace\products\BX\Test.dll...
          Starting execution...

          Final Test Results:
          Results Top Level Tests
          ------- ---------------
          Not Executed ModuleTest.UnitTest1.TestMethod1
          0/1 test(s) Passed, 1 Not Executed

          Summary
          -------
          Test Run Error.
          Not Executed 1
          ---------------
          Total 1
          Results file: c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\TestResult
          s\user_BUILDSERVER 2014-06-30 15_52_47.trx
          Test Settings: Default Test Settings

          Run has the following issue(s):
          Failed to queue test run 'user@BUILDSERVER 2014-06-30 15:52:47': Access to t
          he path 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\TestResults\user_BUILDSERVER 2014-06-30 15_52_47' is denied.
          Error when trying to save result file: Could not find a part of the path 'c:\Pro
          gram Files (x86)\Microsoft Visual Studio 10.0\VC\TestResults\user_BUILDSERVE
          R 2014-06-30 15_52_47.trx'.

          Same happens with the /noresults cmd line.

          But if I change the working folder to c:\Temp, then run the above command, its OK. So it would seem MSTest fails to create some file and returns error? Also if I run MSTest from the VS cmd prompt, which has Admin privileges, then it works. Maybe multiple problems...

          Show
          dzolee Zoltan D added a comment - - edited Sadly, yes. Others had this problem as well ... http://stackoverflow.com/questions/21112717/error-trying-to-run-mstest-on-jenkins I am getting a similar error: Path To MSTest.exe: mstest.exe Result file was not found so no action has been taken. file:/D:/Jenkins/jobs/BX%20AQM%20-%20Tests/workspace/products/BX/AQM_mstest.trx FATAL: null java.lang.NullPointerException at org.jenkinsci.plugins.MsTestBuilder.perform(MsTestBuilder.java:144) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.Build$BuildExecution.build(Build.java:199) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:585) at hudson.model.Run.execute(Run.java:1676) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Could this be a file permission problem on Win2012? If I pop up a cmd prompt on the Jenkins machine (which has VS2010 installed), then the test run fails: c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>mstest /testcontainer:"D: \Jenkins\jobs\BX Tests\workspace\products\BX\Test.dll" Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved. Loading D:\Jenkins\jobs\BX Tests\workspace\products\BX\Test.dll... Starting execution... Final Test Results: Results Top Level Tests ------- --------------- Not Executed ModuleTest.UnitTest1.TestMethod1 0/1 test(s) Passed, 1 Not Executed Summary ------- Test Run Error. Not Executed 1 --------------- Total 1 Results file: c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\TestResult s\user_BUILDSERVER 2014-06-30 15_52_47.trx Test Settings: Default Test Settings Run has the following issue(s): Failed to queue test run 'user@BUILDSERVER 2014-06-30 15:52:47': Access to t he path 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\TestResults\user_BUILDSERVER 2014-06-30 15_52_47' is denied. Error when trying to save result file: Could not find a part of the path 'c:\Pro gram Files (x86)\Microsoft Visual Studio 10.0\VC\TestResults\user_BUILDSERVE R 2014-06-30 15_52_47.trx'. Same happens with the /noresults cmd line. But if I change the working folder to c:\Temp, then run the above command, its OK. So it would seem MSTest fails to create some file and returns error? Also if I run MSTest from the VS cmd prompt, which has Admin privileges, then it works. Maybe multiple problems...
          Hide
          ido_ran Ido Ran added a comment -

          no response and no repro

          Show
          ido_ran Ido Ran added a comment - no response and no repro

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            habakuk S W
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: