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

Problem with MSTest post build action with following message: "FATAL: No MSTest TRX test report files were found. Configuration error?"

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: mstest-plugin
    • Labels:
      None
    • Environment:
      Windows XP SP3; Jenkins installed local; MSTest with UnitTest in Visual Studio 2008, Version 9
    • Similar Issues:

      Description

      MSTest with UnitTests work without problems but in the After build step I activated the MSTest post build step and a .trx file is requested. The path is to the generated .trx file from the build but the build ends with the message
      "FATAL: No MSTest TRX test report files were found. Configuration error?"

      The file is definitly there, it was created!
      Also wildcards doesn't work in this case.

        Attachments

        1. screenshot-1.jpg
          68 kB
          gopivinay gande

          Activity

          Hide
          vishal_gupta Vishal Gupta added a comment -

          As I mention earlier it should be :
          publish Mstest result report : trunk\build\TestOutput\results.trx

          "Path for result report should be relative to your workspace!".

          Show
          vishal_gupta Vishal Gupta added a comment - As I mention earlier it should be : publish Mstest result report : trunk\build\TestOutput\results.trx "Path for result report should be relative to your workspace!".
          Hide
          gopivinay gopivinay gande added a comment -

          Thanks Vishal ....It got passed through the step .BUt i coudn't see any results or any information from .trx

          17:07:57 Loading F:\RequestManagement\Jenkins\jobs\NewTestJob2\workspace\trunk\Hp.Rm.PropelWebTests\Deployment.testsettings...
          17:07:57 Loading F:\RequestManagement\Jenkins\jobs\NewTestJob2\workspace\trunk\Hp.Rm.PropelWebTests\Hp.Rm.PropelWebTests.vsmdi...
          17:07:58 Starting execution...
          17:10:02
          17:10:02 Results Top Level Tests
          17:10:02 ------- ---------------
          17:10:02 Passed (SampleTests/)f:\requestmanagement\jenkins\jobs\newtestjob2\workspace\trunk\hp.rm.propelwebtests\hp.rm.propelwebtests\servicecatalog\singletenant\webtest\loginlogout.webtest
          17:10:02 1/1 test(s) Passed
          17:10:02
          17:10:02 Summary
          17:10:02 -------
          17:10:02 Test Run Completed.
          17:10:02 Passed 1
          17:10:02 ---------
          17:10:02 Total 1
          17:10:02 Results file: F:\RequestManagement\Jenkins\jobs\NewTestJob2\workspace\trunk\build\TestOutput\results.trx
          17:10:02 Test Settings: Deployment
          17:10:02 ********************** The msbuild mstest task for this hudson job is finished *************************************
          17:10:02 Done Building Project "F:\RequestManagement\Jenkins\jobs\NewTestJob2\workspace\trunk\build\MasterBuildScript.proj" (UnitTest target(s)).
          17:10:02
          17:10:02 Build succeeded.
          17:10:02 0 Warning(s)
          17:10:02 0 Error(s)
          17:10:02
          17:10:02 Time Elapsed 00:02:06.02
          17:10:02 Processing tests results in file(s) trunk\build\TestOutput\results.trx
          17:10:02 trunk\build\TestOutput\results.trx
          17:10:02 Finished: SUCCESS

          how am i gonna see my Stats from the trx file on to jenkins Dash borad

          Show
          gopivinay gopivinay gande added a comment - Thanks Vishal ....It got passed through the step .BUt i coudn't see any results or any information from .trx 17:07:57 Loading F:\RequestManagement\Jenkins\jobs\NewTestJob2\workspace\trunk\Hp.Rm.PropelWebTests\Deployment.testsettings... 17:07:57 Loading F:\RequestManagement\Jenkins\jobs\NewTestJob2\workspace\trunk\Hp.Rm.PropelWebTests\Hp.Rm.PropelWebTests.vsmdi... 17:07:58 Starting execution... 17:10:02 17:10:02 Results Top Level Tests 17:10:02 ------- --------------- 17:10:02 Passed (SampleTests/)f:\requestmanagement\jenkins\jobs\newtestjob2\workspace\trunk\hp.rm.propelwebtests\hp.rm.propelwebtests\servicecatalog\singletenant\webtest\loginlogout.webtest 17:10:02 1/1 test(s) Passed 17:10:02 17:10:02 Summary 17:10:02 ------- 17:10:02 Test Run Completed. 17:10:02 Passed 1 17:10:02 --------- 17:10:02 Total 1 17:10:02 Results file: F:\RequestManagement\Jenkins\jobs\NewTestJob2\workspace\trunk\build\TestOutput\results.trx 17:10:02 Test Settings: Deployment 17:10:02 ********************** The msbuild mstest task for this hudson job is finished ************************************* 17:10:02 Done Building Project "F:\RequestManagement\Jenkins\jobs\NewTestJob2\workspace\trunk\build\MasterBuildScript.proj" (UnitTest target(s)). 17:10:02 17:10:02 Build succeeded. 17:10:02 0 Warning(s) 17:10:02 0 Error(s) 17:10:02 17:10:02 Time Elapsed 00:02:06.02 17:10:02 Processing tests results in file(s) trunk\build\TestOutput\results.trx 17:10:02 trunk\build\TestOutput\results.trx 17:10:02 Finished: SUCCESS how am i gonna see my Stats from the trx file on to jenkins Dash borad
          Hide
          jfaenomoto João Enomoto added a comment -

          Just pointing out that I had a similar log on my build and I got it solved:

          I'm running a local Jenkins server in Windows with a unique constructor on it, so no interactions with Jenkins slaves. My workspace was configure to output .trx on a hardcoded file path (something like 'C:\TestResults\') which was different from job's workspace.

          Looks like Jenkins can't access hardcoded paths, which is certainly a security measure to avoid access to system directories.

          The solution was use WORKSPACE placeholder variable to set in execution script (which was a command prompt) and setting plugin's TRX path to */.trx (which is every .trx file in job's workspace). That solved the problem.

          Show
          jfaenomoto João Enomoto added a comment - Just pointing out that I had a similar log on my build and I got it solved: I'm running a local Jenkins server in Windows with a unique constructor on it, so no interactions with Jenkins slaves. My workspace was configure to output .trx on a hardcoded file path (something like 'C:\TestResults\') which was different from job's workspace. Looks like Jenkins can't access hardcoded paths, which is certainly a security measure to avoid access to system directories. The solution was use WORKSPACE placeholder variable to set in execution script (which was a command prompt) and setting plugin's TRX path to * / .trx (which is every .trx file in job's workspace). That solved the problem.
          Hide
          jfaenomoto João Enomoto added a comment - - edited

          To ilustrate, I'm giving away my build example.

          Execute Windows command prompt:
          cd\
          cd TestResults\
          rm * -r
          rm "%WORKSPACE%\myresult.trx"

          cd \
          cd Release\
          mstest /testcontainer:"UnitTest.dll" /resultsfile:"%WORKSPACE%\myresult.trx"

          Publish MSTest test report:
          **/*.trx

          More on Jenkins environment variables: https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project

          Hope I could help.

          Show
          jfaenomoto João Enomoto added a comment - - edited To ilustrate, I'm giving away my build example. Execute Windows command prompt: cd\ cd TestResults\ rm * -r rm "%WORKSPACE%\myresult.trx" cd \ cd Release\ mstest /testcontainer:"UnitTest.dll" /resultsfile:"%WORKSPACE%\myresult.trx" Publish MSTest test report: ** / *.trx More on Jenkins environment variables: https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project Hope I could help.
          Hide
          nilleb Ivo Bellin Salarin added a comment -

          Since version 0.11, wildcards and ant fileset patterns are supported.
          Paths should be considered as relative to the workspace.

          Feel free to use jenkins well known variables.

          Show
          nilleb Ivo Bellin Salarin added a comment - Since version 0.11, wildcards and ant fileset patterns are supported. Paths should be considered as relative to the workspace. Feel free to use jenkins well known variables.

            People

            • Assignee:
              cld2403 Claudia Drabetz
              Reporter:
              cld2403 Claudia Drabetz
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: