Skip to content

Instantly share code, notes, and snippets.

@lars-nielsen
Last active January 23, 2020 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lars-nielsen/38b9501de994ac928e9122853ca5113a to your computer and use it in GitHub Desktop.
Save lars-nielsen/38b9501de994ac928e9122853ca5113a to your computer and use it in GitHub Desktop.
Quest to have NUnit3TestAdapter placed in the autogenerated TestResults/{Guid} folder
<?xml version="1.0" encoding="utf-8" ?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="XPlat code coverage">
<Configuration>
<Format>json</Format>
<IncludeTestAssembly>false</IncludeTestAssembly>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
<InProcDataCollectionRunSettings>
<InProcDataCollectors>
<InProcDataCollector assemblyQualifiedName="Coverlet.Collector.DataCollection.CoverletInProcDataCollector, coverlet.collector, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null"
friendlyName="XPlat Code Coverage"
enabled="True"
codebase="coverlet.collector.dll" />
</InProcDataCollectors>
</InProcDataCollectionRunSettings>
<NUnit>
<Verbosity>1</Verbosity>
</NUnit>
</RunSettings>
"C:\Program Files\dotnet\dotnet.exe" test C:\Code\MyProject\Tests\MyTest\MyTest.csproj --configuration Release --no-build --settings .runsettings --verbosity Normal
# The above command will create the folders TestResults\d0899c23-b2f2-49b5-88aa-5728f4cb245b and place my coverage file as:
# C:\Code\MyProject\Tests\MyTest\TestResults\d0899c23-b2f2-49b5-88aa-5728f4cb245b\coverage.json
# I would like to have my TestsResults.xml file placed in the same folder
# C:\Code\MyProject\Tests\MyTest\TestResults\d0899c23-b2f2-49b5-88aa-5728f4cb245b\TestsResults.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment