question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Xunit failed tests are not discovered when rerun.

See original GitHub issue

Note

Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo

For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

If you have an issue or request for the Azure Pipelines service, use developer community instead:

https://developercommunity.visualstudio.com/spaces/21/index.html )

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: VsTest

list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

Environment

  • Server - Azure Pipelines or TFS on-premises?

  • Agent - Hosted or Private:

    • If using Hosted agent, provide agent queue name:

    • If using private agent, provide the OS of the machine running the agent and the agent version:

Issue Description

Failed tests are not discovered when rerun. test method signature looks like

[Theory]
        [InlineData(CloneViewType.DetailView,Platform.Web)]
        internal void Clone_Model_View(CloneViewType cloneViewType,Platform platform){

Task logs

Vstest.console.exe exited with code 1. **************** Completed test execution ********************* Test results files: d:\a_temp\TR_5b5fe79a-af70-4628-8d47-9bc2a199c636\VssAdministrator_fv-az674_2019-07-24_12_59_14.trx Created test run: 1000454 Publishing test results: 251 Publishing test results to test run ‘1000454’. TestResults To Publish 251, Test run id:1000454 Test results publishing 251, remaining: 0. Test run id: 1000454 Published test results: 251 Publishing Attachments: 2 Failed tests: 1; Total tests: 251; Total failed tests as return by TCM:1 Found 1 filtered test case sources. **************** Rerunning failed tests for Test run 1000454 ********************* Max attempts: 3; Current attempt: 1; Failed test cases threshold: 30; Failed test cases max limit: 0 [command]C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe “@C:\Users\VssAdministrator\AppData\Local\Temp\tmp748A.tmp” Microsoft ® Test Execution Command Line Tool Version 16.1.0 Copyright © Microsoft Corporation. All rights reserved. vstest.console.exe /TestCaseFilter:“FullyQualifiedName=Xpand.XAF.Modules.CloneModelView.Tests.CloneModelViewTests.Clone_Model_ListView_and_change_its_detailview(cloneViewType: ListView, platform: Web)” “d:\a\1\s\src\Tests\CloneModelView\bin\Debug\Xpand.XAF.Modules.CloneModelView.Tests.dll” /Settings:“d:\a_temp\3mdg4eylmdo.runsettings” /EnableCodeCoverage /InIsolation /Logger:“trx” /TestAdapterPath:“d:\a\1\s” Starting test execution, please wait… M i c r o s o f t ( R ) C o v e r a g e C o l l e c t i o n T o o l V e r s i o n 1 6 . 0 . 3 0 3 1 9 . 2 0 0

C o p y r i g h t ( c ) M i c r o s o f t C o r p o r a t i o n . A l l r i g h t s r e s e r v e d .

2.3599 [xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.1 (32-bit Desktop .NET 4.0.30319.42000) [xUnit.net 00:00:02.07] Discovering: Xpand.XAF.Modules.CloneModelView.Tests [xUnit.net 00:00:02.96] Discovered: Xpand.XAF.Modules.CloneModelView.Tests [xUnit.net 00:00:02.96] Xpand.XAF.Modules.CloneModelView.Tests: Exception filtering tests: Filter string ‘cloneViewType: ListView, platform: Web’ includes unrecognized escape sequence. [xUnit.net 00:00:02.96] Starting: Xpand.XAF.Modules.CloneModelView.Tests [xUnit.net 00:00:03.01] Finished: Xpand.XAF.Modules.CloneModelView.Tests No test matches the given testcase filter FullyQualifiedName=Xpand.XAF.Modules.CloneModelView.Tests.CloneModelViewTests.Clone_Model_ListView_and_change_its_detailview(cloneViewType: ListView\, platform: Web) in d:\a\1\s\src\Tests\CloneModelView\bin\Debug\Xpand.XAF.Modules.CloneModelView.Tests.dll

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

[Insert error from the logs here for a quick overview]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Evangelinkcommented, Aug 3, 2022

Closing the issue, feel free to ping us if you are still having this issue.

1reaction
Evangelinkcommented, Jul 25, 2022

@apobekiaris @aprout76 Are you still facing the issue with newer release of Test Platform?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rerun C# failed tests with xUnit framework in TeamCity
I'm using C#, XUNIT and Selenium for a suite of automated UI tests. They can be flakey and a simple rerun will pass...
Read more >
VSTest task bug: Rerun tests which contain spaces in their ...
VSTest task bug: Rerun tests which contain spaces in their names does not work - Developer Community.
Read more >
Getting Started: .NET Framework with Visual Studio ...
NET Framework test project, because Visual Studio doesn't contain a test ... run selected tests, re-run the last tests, and re-run only the...
Read more >
Run unit tests with Test Explorer - Visual Studio (Windows)
View test results​​ As you run, write, and rerun your tests, Test Explorer displays the results in groups of Failed Tests, Passed Tests,...
Read more >
Work with unit tests in project or solution - JetBrains Rider
You can also re-run tests that failed by pressing Ctrl 0U , 0F or choosing Tests | Rerun Failed Tests in the menu....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found