Running dotnet core xUnit tests on Visual Studio Team Services (VSTS)

1: Run dotnet restore to restore package dependencies.

2: Run dotnet build to build the binaries.
3: Run dotnet test to run the tests. Note the additional parameters –no-build to prevent a rebuild and –logger “trx;LogFileName=tests-log.trx” to ensure the test results are written to disk,
5: Use  a Publish Test Results tasks to output the results of the tests. Make sure you set the following properties
  • Test Result Format = VSTest
  • Test Results Files = **/tests-log.trx
And under the Advanced section make sure you set the Run This Task option so that it will run even if the previous task failed.

Comments

Leave a Reply

Your email address will not be published.