Legacy .NET agent - Running tests
Running tests with MS Test or nUnit
When using MS Test or nUnit the testStage argument can be added to the testListener command directly and the tests will be monitored by the test listener. Test results will also be uploaded automatically when finished
SL.DotNet.exe testListener --buildSessionIdFile buildSessionId.txt --testStage "Functional Tests" --target c:\MyApplication\App.exe --workingDir c:\WorkingDir --targetArgs "-Flag1 true MyTest.dll"
Running tests manually using CLI
Starting a test stage
Before you start running your tests, you need to send the SeaLights server a start execution event with the test stages name
SL.DotNet.exe startExecution --buildSessionIdFile buildSessionId.txt --testStage "Functional Tests"
Running your tests
Now you can run your tests while capturing coverage in one of the following ways the SeaLights .NET agent supports
Uploading a report
Once the tests finish running you can upload one or more report files. Supported formats are MSTest (TRX files), xUnit.Net and NUnit (XML files)
SL.DotNet.exe uploadTestReport --buildSessionIdFile buildSessionId.txt --testStage "Functional Tests" --report myReport.trx
Ending the test stage
Once you are finished running your tests and uploading the results, you need to send the SeaLights server an end execution event with the test stages name
See 'SeaLights .NET - command reference' for full parameter details