This instructions applies to upload your test coverage to coveralls.io
Using Coveleralls .NET package and Visual Studio 2015 Enterprise
- Create Unit test project. Click Analyze Code Coverage from main menu in Visual Studio.
- Check
TestResults
folder in root directory of your project. Find.coverage
file.
- (If you don't use VS 2015 Enterprice check:
vstest.console.exe /inIsolation /Enablecodecoverage YourTestProject.dll
and find the output.coverage
file)
- Execute following command:
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe" analyze /output:coverage.coveragexml C:\PathToYourCoverage.coverage
where you will replaceC:\PathToYourCoverage.coverage
with your real physical path.
This will generatecoverage.coveragexml
. - Then execute
csmacnz.Coveralls.exe --dynamiccodecoverage -i coverage.coveragexml --repoToken <YourRepoTokenHere> -o cov.json --dryrun --useRelativePaths
This will generatecov.json
file with
--dryrun
means that the command will not upload data to coveralls.io. If you want to upload, just remove it. Don't forget to add your repoToken from coveralls.io