-
Notifications
You must be signed in to change notification settings - Fork 8
Running Unit Tests
RachelTucker edited this page Aug 22, 2016
·
5 revisions
Unit tests for the .NET DS3 SDK are written with NUnit.
- First Build the SDK from Source
- From command line, navigate to the root directory
ds3_net_sdk
and run the command./packages/NUnit.ConsoleRunner.{version}/tools/nunit3-console.exe TestDs3/bin/Release/TestDs3.dll
Note that{version}
represents the NUnit version
- First Build the SDK from Source
- Execute "ds3_net_sdk/packages/NUnit.Runners.{version}/tools/nunit.exe".
- Click File -> Open.
- Open ds3_net_sdk\TestDs3\bin\Debug\TestDs3.dll.
- Click the root of the tree to the left.
- Click Run to run the tests.
- Open the NUnit GUI test runner and select the appropriate DLL as above.
- In Visual Studio, click TOOLS -> Attach to Process...
- Find and select nunit-agent.exe
- Click "Attach"
- Click "Run" inside of the NUnit GUI test runner. The Visual Studio debugger will now stop at breakpoints and exceptions.
- Open a cmd window
- Run the following commands:
- cd ds3_net_sdk\TestDs3\bin\Debug
- runCoverage.bat
- coverage\index.htm
You can also run the tests directly from paid editions of Visual Studio. To do so, you'll need to install the "NUnit Test Adapter" extension from the Visual Studio Gallery.