dotnet test not creating test results folder

后端 未结 2 1635
北恋
北恋 2021-01-04 03:38

As part of our ASP.NET Core 2.0 build process I have added a dotnet test command which I have added as a Windows batch file.

Here is my co

2条回答
  •  隐瞒了意图╮
    2021-01-04 04:04

    To output the test results from dotnet test, you can try pass -xml /some/path/out.xml or use the work parameter, like this: dotnet test --work:"mypath/myresult.xml". See below threads for details:

    • dotnet test - Output test results
    • Is there a way to specify TestResult.xml location?

    Besides, generally you need to specify the argument -l|--logger which specifies a logger for test results.

    e.g.:

    dotnet test "myproject.csproj" --logger "trx;LogFileName=path\to\tests\folder\results.trx" or dotnet test "myproject.csproj" -l:"trx;LogFileName=path\to\tests\folder\results.trx"

    To make the generated trx files available as test results in VSTS/TFS, you can use the "Publish Test Results" task:

提交回复
热议问题