microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.5k stars 2.61k forks source link

[Bug]: Missing multiple stack traces for Assert.Multiple (Nunit 3) in Azure pipeline test results #16524

Open gps7 opened 2 years ago

gps7 commented 2 years ago

Required Information

Question
Type: We have setup Azure DevOps pipelines with running Nunit 3 tests. Recently we started to use Assert.Multiple functionality provided with Nunit 3 but it turns out it has some problems when one or more failures happens inside of Assert.Multiple since test results always providing single stack trace with last entry for test itself. Analyzing this problem it turns out same problem occurring for TestCentric (Issue 907) and after raising this problem it turned out that problem is un consuming the Nunit console results xml file where double information contained for backwards compatibility of Nunit 2. So question is who responsible for test result reading so I could raise issue for this topic at right place?

Test example used to run which provides 3 failures:

[Test]
public void AssertMultiple()
{
  Assert.Multiple(() =>
  {
    ValidateInteger();
    Assert.That("a", Is.EqualTo("b"), "String");
    ValidateInteger();
  });
}

private void ValidateInteger() => Assert.That(1, Is.EqualTo(2), "Integer");

Environment

Issue Description

Running provided sample tests on Azure DevOps results in shown single stack trace instead of 3 failures in single test. View of the build results: Build_server_test_results

The result file contains displayed as well as extended information about failures: Nunit_result_file

Please help to determine problem or the repository causing this problem. My guess that this is one of the task responsibility in this repository but I am not sure. We have configured "Publish Test Results" similar as described here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=trx%2Cyaml

Task logs

The pipeline Execute Tests shown detailed information: Build server pipeline output.txt

Troubleshooting

N/A

Error logs

N/A

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

gps7 commented 1 year ago

It is valid problem. Please open the bug.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

gps7 commented 1 year ago

The problem still persist. I need solution.

gps7 commented 1 year ago

Is this thread totally ignored?

gps7 commented 11 months ago

How to resolve this problem?

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days