Hi Team,
We are running the Unit test cases via MSTest runner Plugin on Bamboo and the test files are generated on build agent machine.
We are trying to get the coverage report for result files using opencover via script task but getting error
Below is the script task
set mse="D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7"
set out="D:\bamboo-agent-home\xml-data\build-dir\TCWA-Q2TCWAD-JOB1\openCover"
cd "D:\Program Files\OpenCover.4.6.519\tools\"
.\OpenCover.Console.exe -target:$mse\IDE\mstest.exe" -targetargs:"/noisolation /testcontainer:\"D:\bamboo-agent-home\xml-data\build-dir\TCWA-Q2TCWAD-JOB1\Q2.TCWA\UnitTests\API.Tests\bin\Release\API.Tests.dll\"" /resultsfile:"D:\bamboo-agent-home\xml-data\build-dir\TCWA-Q2TCWAD-JOB1\APItest.trx" -reports:"D:\bamboo-agent-home\xml-data\build-dir\TCWA-Q2TCWAD-JOB1\TestResults\openCover" -targetdir: "D:\bamboo-agent-home\xml-data\build-dir\TCWA-Q2TCWAD-JOB1\TestResults\openCover\html" -filter:"+[]" -mergebyhash -output:"$out"\TCWA-Q2TCWAD-JOB1.CodeCoverage.xml"
Error:
The argument '/testcontainer:\D:\bamboo-agent-home\xml-data\build-dir\TCWA-Q2TCWAD-JOB1\Q2.TCWA\UnitTests\API.Tests\bin\Release\API.Tests.dll"' is not recognised
I am new to bamboo. Please help me with it
Hi Sowmya,
As you can see in the improvement request below, Bamboo does not support OpenCover "out of the box" :
After a quick search, I found the following blog post that, at first glance, seems to be a pretty good way to workaround this limitation. This method uses an intermediary step with NCover. You can try it out and see if it works in your case.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.