Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure DevOps pipeline tests fail...but how can I easily identify which tests?

I have a VSTest@2 step in my Azure DevOps build pipeline.

I get the following in the output:

 Results File:
 d:\a\_temp\TestResults\VssAdministrator_xx-az678_2020-02-25_18_50_38.trx
 Total tests: 7132
      Passed: 7108
      Failed: 2
     Skipped: 22
 ##[error]Test Run Failed.
....
##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
##[error]Error: The process 'd:\a\_tasks\VSTest_{SomeGuid}\2.165.2\Modules\DTAExecutionHost.exe' failed with exit code 1
##[error]Vstest failed with error. Check logs for failures. There might be failed tests.

Okay, so two tests failed (out of 7,132). As far as I can see, there's nothing helpful that says "Here are the two tests that failed". The output is enormous and it takes

like image 224
DrGriff Avatar asked Oct 15 '25 08:10

DrGriff


1 Answers

how can I easily identify which tests

For this issue ,you can view the test report in Tests tab. Test reports provide an effective and consistent way to view the tests results executed using different test frameworks, in order to measure pipeline quality, review traceability, troubleshoot failures and drive failure ownership.

Test results can be surfaced in the Tests tab using one of the following options:

  • Automatically inferred test results. By default, your pipeline can automatically infer the test output for a few popular test runners. This is done by parsing the error logs generated during the build operation and then checking for signatures of test failures.
  • Test execution tasks. Built-in test execution tasks such as Visual Studio Test that automatically publish test results to the pipeline, or others such as Ant, Maven, Gulp, Grunt, and Xcode that provide this capability as an option within the task.
  • Publish Test Results task. Task that publishes test results to Azure Pipelines or TFS when tests are executed using your choice of runner, and results are available in any of the supported test result formats.
  • API(s). Test results published directly by using the Test Management API(s).

enter image description here

You can refer to this document for details.

like image 64
Hugh Lin Avatar answered Oct 17 '25 00:10

Hugh Lin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!