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

Not picking up multiple code coverage files

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Won't Fix
    • Minor
    • mstest-plugin
    • None
    • MSTest plugin 0.19. Visual Studio 2015 Update 1, Emma pplugin 1.29

    Description

      I have 5 test projects in my solution. I'm building my test results and code coverage with the script below.

      $projectFolders = ls Sources\*.Test* | % { $_.Name }
      foreach ($projectName in $projectFolders)
      {
        vstest.console.exe "Sources\$projectName\bin\Dev\$projectName.dll" /Logger:trx /EnableCodeCoverage /Platform:x64
      }
      $trxFiles = ls TestResults -Recurse -Include *.trx
      foreach ($trxFile in $trxFiles)
      {
        $testdataFolder = $trxFile.FullName -replace '.trx$',''
        $coverageFile = ls $testdataFolder -Recurse -Include *.coverage
        if ($coverageFile.Count -gt 0)
        {
          $outFolder = join-path $testdataFolder Out
          mkdir $outFolder | out-null
          mv $trxFile.FullName $outFolder
          C:\Util\CoverageConverter\CoverageConverter.exe $coverageFile.FullName (join-path $outFolder vstest.coveragexml)
        }
      }
      

      This creates 5 folders in TestResults named like glompix_MACHINENAME 2016-03-11 17_38_57\Out\. You can see the glompix_MACHINENAME_etc.trx, vstest.coveragexml, and emma\coverage.xml files.

      However, only part of my solution shows up in code coverage. If I target a single project, it works like a charm. It seems the results aren't being merged correctly.

      Attachments

        Activity

          People

            nilleb Ivo Bellin Salarin
            glompix Stuart Branham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: