Skip to content

testspace-samples/csharp.nunit

 
 

Repository files navigation

Testspace


C#/NUnit sample for demonstrating Testspace

This sample demonstrates techniques for using Testspace with C# code and the NUnit test framework, along with the OpenCover coverage tool and Visual Studio's static analysis tool using NUnit's C# examples.

  • Using a Testspace Project that is connected with this GitHub Repo
  • Using 1 Online CI services for demonstration purposes only
  • Can review the Results at testspace-samples:csharp.nunit
  • Refer to our Help for more information

Using CI Services:

Build Build Status Build status


Publishing Test Content using www.testspace.com.

Space Health Space Metric Space Metric


In order to run this sample you will need a host workstation with Visual Studio, the Nunit test framework and the OpenCover coverage tool.

Download and configure the Testspace client

appveyor DownloadFile https://testspace-client.s3.amazonaws.com/testspace-windows.zip
7z x -y testspace-windows.zip
testspace config url samples.testspace.com

Building with static analysis:

msbuild money\cs-money.csproj /p:platform=anycpu /p:configuration=debug /p:runCodeAnalysis=true /p:codeanalysislogfile=..\analysis.xml

Running tests with code coverage:

OpenCover.Console -target:"nunit3-console.exe" -targetargs:"cs-money.dll" -output:"coverage.xml" -filter:"+[*]* -[*]*MoneyTest*" -register:user

Push Content using Testspace client

testspace analysis.xml [Tests]TestResult.xml coverage.xml