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

No support for UnitTest XML reporting per sub job when using matrix projects

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • xunit-plugin
    • None
    • Jenkins v1.426
      xUnit Plugin v1.20

      Hi there,

      I've got a matrix project which builds some unit test executables and then the PostBuild Step in Visual Studio actually runs them. The UnitTest executables output a UnitTest-1.4 XML results file. To hook this into Jenkins I use the "Publish testing tools result report" option in the "Post-build Action" part of my project setup.

      The matrix project has 2 sub jobs - Debug and Release. In my project setup I have 2 patterns configured:

      1) Debug build
      tfields/Live/Engine/Tests/UnitTests/Core/LOD/UnitTestsLODResultsWin32D.xml

      2) Release build
      tfields/Live/Engine/Tests/UnitTests/Core/LOD/UnitTestsLODResultsWin32.xml

      The first (Debug) sub-job builds, runs then outputs:

      16:27:56  Total time: 1 minute 42 seconds
      16:27:56  [xUnit] [INFO] - Starting to record.
      16:27:56  [xUnit] [INFO] - Processing UnitTest-1.4 (default)
      16:27:56  [xUnit] [INFO] - [UnitTest-1.4 (default)] - 1 test report file(s) were found with the pattern 'tfields/Live/Engine/Tests/UnitTests/Core/LOD/UnitTestsLODResultsWin32D.xml' relative to 'C:\JCI\workspace\UnitTest_Core_LOD\COMPILER\CL\CONFIG\Debug\PLATFORM\Win32' for the testing framework 'UnitTest-1.4 (default)'.
      16:27:56  [xUnit] [INFO] - Processing UnitTest-1.4 (default)
      16:27:56  [xUnit] [WARNING] - Can't create the path C:\JCI\workspace\UnitTest_Core_LOD\COMPILER\CL\CONFIG\Debug\PLATFORM\Win32\generatedJUnitFiles. Maybe the directory already exists.
      16:27:56  [xUnit] [INFO] - [UnitTest-1.4 (default)] - No test report file(s) were found with the pattern 'tfields/Live/Engine/Tests/UnitTests/Core/LOD/UnitTestsLODResultsWin32.xml' relative to 'C:\JCI\workspace\UnitTest_Core_LOD\COMPILER\CL\CONFIG\Debug\PLATFORM\Win32' for the testing framework 'UnitTest-1.4 (default)'.  Did you enter a pattern relative to the correct directory?  Did you generate the result report(s) for 'UnitTest-1.4 (default)'?
      16:27:56  [xUnit] [ERROR] - No test reports found for the metric 'UnitTest-1.4 (default)' with the resolved pattern 'tfields/Live/Engine/Tests/UnitTests/Core/LOD/UnitTestsLODResultsWin32.xml'. Configuration error?.
      16:27:56  [xUnit] [INFO] - Stopping recording.
      

      As you can see it even though it's doing the "Debug" build first, it's already looking for the Release version of the XML results even though the build hasn't happened yet.

      Can the plugin be updated to support XML results per subjob? Or is there another way to achieve what I'm trying to do?

      Regards,
      Tom.

            gbois Gregory Boissinot
            tfields Thomas Fields
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: