microsoft / azure-pipelines-tasks

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

"##[error]The test source file "D:\a\1\s\Slavery" provided was not found." issue make VSTest@2 failed to rerun testcases #17592

Closed nnson0310 closed 1 year ago

nnson0310 commented 1 year ago

Required Information

Question, Bug, or Feature? Type: Bug

Enter Task Name: VSTest@2

Environment

Server - Azure Pipelines or TFS on-premises? Azure Pipelines

Agent - Hosted or Private: Hosted Agent, windows-latest

Issue Description

I use VSTest@2 to run quite a bunch of testcases (using Selenium C# and Nunit) for three months so far and until yesterday, VSTest@2 suddenly stop to rerun failed testcases without reason and throw this error:

##[error]The test source file "D:\a\1\s\Slavery" provided was not found.

Below is my pipeline yml:

- task: VSTest@2
        env:
          VISUAL_TEST_USERNAME: $(VISUAL_TEST_USERNAME)
          VISUAL_TEST_PASSWORD: $(VISUAL_TEST_PASSWORD)
          BROWSER: ${{ parameters.BROWSER }}
          ENVIRONMENT: ${{ parameters.ENVIRONMENT }}
        displayName: 'Run test with VSTest runner on ${{ parameters.ENVIRONMENT }}'
        inputs:
          testSelector: 'testAssemblies'
          #testFiltercriteria: 'TestCategory=Download'
          testAssemblyVer2: |
            **\*CarRentalE2E.dll
            !**\*TestAdapter.dll
            !**\obj\**
          searchFolder: '$(System.DefaultWorkingDirectory)'
          runSettingsFile: '$(System.DefaultWorkingDirectory)\.runsettings'
          publishRunAttachments: true
          rerunType: 'basedOnTestFailurePercentage'
          rerunFailedTests: true
          rerunMaxAttempts: '3'
          rerunFailedThreshold: '30'

And Below is the log from console:

2023-01-06T02:38:40.2532778Z Results File: D:\a\_temp\TestResults\VssAdministrator_fv-az294-712_2023-01-06_02_31_31.trx
2023-01-06T02:38:40.2817692Z Total tests: 71
2023-01-06T02:38:40.2818711Z      Passed: 69
2023-01-06T02:38:40.2824383Z      Failed: 2
2023-01-06T02:38:40.2877865Z ##[error]Test Run Failed.
2023-01-06T02:38:40.2903312Z  Total time: 7.7188 Minutes
2023-01-06T02:38:40.3193592Z Vstest.console.exe exited with code 1.
2023-01-06T02:38:40.3194871Z **************** Completed test execution *********************
2023-01-06T02:38:40.3296125Z Test results files: D:\a\_temp\TestResults\VssAdministrator_fv-az294-712_2023-01-06_02_31_31.trx
2023-01-06T02:38:40.8089839Z Created test run: 1020074
2023-01-06T02:38:40.8092763Z Publishing test results: 71
2023-01-06T02:38:40.9145021Z Publishing test results to test run '1020074'.
2023-01-06T02:38:40.9178077Z TestResults To Publish 71, Test run id:1020074
2023-01-06T02:38:40.9304829Z Test results publishing 71, remaining: 0. Test run id: 1020074
2023-01-06T02:38:41.9318419Z Published test results: 71
2023-01-06T02:38:41.9325657Z Publishing Attachments: 1
2023-01-06T02:38:42.5594284Z Failed tests: 2; Total tests: 71;
2023-01-06T02:38:42.6610661Z Total failed tests as returned by TCM: 2.
2023-01-06T02:38:42.6622548Z Found 1 filtered test case sources.
2023-01-06T02:38:42.6658150Z **************** Rerunning failed tests for Test run 1020074 *********************
2023-01-06T02:38:42.6658900Z Max attempts: 3; Current attempt: 1; Failed test cases threshold: 30; Failed test cases max limit: 0
2023-01-06T02:38:42.6659866Z [command]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe "@D:\a\_temp\ytnzowexmbb.tmp"
2023-01-06T02:38:42.7340528Z Microsoft (R) Test Execution Command Line Tool Version 17.4.1 (x64)
2023-01-06T02:38:42.7341487Z Copyright (c) Microsoft Corporation.  All rights reserved.
2023-01-06T02:38:42.7405121Z vstest.console.exe /TestCaseFilter:"FullyQualifiedName=CarRentalE2E.TestCases.RegressionTest.HomePageTest.RT_HomePageTest_Header_ProfileMenu.RT_HomePageTest_Header_ProfileMenu_03_VerifySignedInUserCanSwitchLocation(\"Canada\"\,\"CAN\"\,\"CarRental in Canada\"\,\"CarRental in Canada\")|FullyQualifiedName=CarRentalE2E.TestCases.RegressionTest.HomePageTest.RT_HomePageTest_Footer.RT_HomePageTest_Footer_04_VerifyFooterPDFDownloadLink(\"Modern Slavery Statement\"\,\"https://www.CarRental.com/492c0a/assets/local/about-CarRental/sustainability-and-corporate-responsibility/documents/2021/modern-slavery-and-human-trafficking-statement.pdf\"\,\"modern-slavery-and-human-trafficking-statement.pdf\")"
2023-01-06T02:38:42.7408242Z "D:\a\1\s\bin\Debug\net6.0\CarRentalE2E.dll"
2023-01-06T02:38:42.7408922Z /Settings:"D:\a\_temp\nre5sdzqr1u.tmp.runsettings"
2023-01-06T02:38:42.7409395Z /Logger:"trx"
2023-01-06T02:38:42.7409841Z /TestAdapterPath:"D:\a\1\s"
2023-01-06T02:38:42.9505303Z ##[error]The test source file "D:\a\1\s\in" provided was not found.
2023-01-06T02:38:42.9598906Z Vstest.console.exe exited with code 1.
2023-01-06T02:38:42.9601580Z **************** Completed test execution *********************
2023-01-06T02:38:42.9602464Z Test results files: D:\a\_temp\TestResults\VssAdministrator_fv-az294-712_2023-01-06_02_31_31.trx
2023-01-06T02:38:42.9706387Z Updating test results: 71
2023-01-06T02:38:43.0096495Z Publishing test results to test run '1020074'.
2023-01-06T02:38:43.2990581Z TestResults To Publish 71, Test run id:1020074
2023-01-06T02:38:43.2991758Z Test results publishing 71, remaining: 0. Test run id: 1020074
2023-01-06T02:38:43.7760109Z Updated test results: 71
2023-01-06T02:38:43.7761779Z Publishing Attachments: 1
2023-01-06T02:38:43.8443741Z ##[warning]This VssAdministrator_fv-az294-712_2023-01-06_02_31_31.trx already exists
2023-01-06T02:38:43.8880819Z Failed to upload run logs to LogStore, Trying to upload to FileService
2023-01-06T02:38:44.1877579Z Failed tests: 2; Total tests: 71;
2023-01-06T02:38:44.2680892Z Total failed tests as returned by TCM: 2.
2023-01-06T02:38:44.2683093Z Found 1 filtered test case sources.
2023-01-06T02:38:44.2688013Z **************** Rerunning failed tests for Test run 1020074 *********************
2023-01-06T02:38:44.2689011Z Max attempts: 3; Current attempt: 2; Failed test cases threshold: 30; Failed test cases max limit: 0
2023-01-06T02:38:44.2689942Z [command]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe "@D:\a\_temp\ynlezhv5hbq.tmp"
2023-01-06T02:38:44.3404838Z Microsoft (R) Test Execution Command Line Tool Version 17.4.1 (x64)
2023-01-06T02:38:44.3405979Z Copyright (c) Microsoft Corporation.  All rights reserved.
2023-01-06T02:38:44.3474086Z vstest.console.exe /TestCaseFilter:"FullyQualifiedName=CarRentalE2E.TestCases.RegressionTest.HomePageTest.RT_HomePageTest_Header_ProfileMenu.RT_HomePageTest_Header_ProfileMenu_03_VerifySignedInUserCanSwitchLocation(\"Canada\"\,\"CAN\"\,\"CarRental in Canada\"\,\"CarRental in Canada\")|FullyQualifiedName=CarRentalE2E.TestCases.RegressionTest.HomePageTest.RT_HomePageTest_Footer.RT_HomePageTest_Footer_04_VerifyFooterPDFDownloadLink(\"Modern Slavery Statement\"\,\"https://www.CarRental.com/492c0a/assets/local/about-CarRental/sustainability-and-corporate-responsibility/documents/2021/modern-slavery-and-human-trafficking-statement.pdf\"\,\"modern-slavery-and-human-trafficking-statement.pdf\")"
2023-01-06T02:38:44.3475940Z "D:\a\1\s\bin\Debug\net6.0\CarRentalE2E.dll"
2023-01-06T02:38:44.3476462Z /Settings:"D:\a\_temp\nre5sdzqr1u.tmp.runsettings"
2023-01-06T02:38:44.3476912Z /Logger:"trx"
2023-01-06T02:38:44.3477287Z /TestAdapterPath:"D:\a\1\s"
2023-01-06T02:38:44.5494338Z ##[error]The test source file "D:\a\1\s\in" provided was not found.
2023-01-06T02:38:44.5559132Z Vstest.console.exe exited with code 1.
2023-01-06T02:38:44.5560675Z **************** Completed test execution *********************
2023-01-06T02:38:44.5561699Z Test results files: D:\a\_temp\TestResults\VssAdministrator_fv-az294-712_2023-01-06_02_31_31.trx
2023-01-06T02:38:44.5603205Z Updating test results: 71
2023-01-06T02:38:44.5930508Z Publishing test results to test run '1020074'.
2023-01-06T02:38:44.6979332Z TestResults To Publish 71, Test run id:1020074
2023-01-06T02:38:44.6980391Z Test results publishing 71, remaining: 0. Test run id: 1020074
2023-01-06T02:38:45.1811592Z Updated test results: 71
2023-01-06T02:38:45.1813092Z Publishing Attachments: 1
2023-01-06T02:38:45.2413532Z ##[warning]This VssAdministrator_fv-az294-712_2023-01-06_02_31_31.trx already exists
2023-01-06T02:38:45.2424016Z Failed to upload run logs to LogStore, Trying to upload to FileService
2023-01-06T02:38:45.4831401Z Failed tests: 2; Total tests: 71;
2023-01-06T02:38:45.5636425Z Total failed tests as returned by TCM: 2.
2023-01-06T02:38:45.5637359Z Found 1 filtered test case sources.
2023-01-06T02:38:45.5641946Z **************** Rerunning failed tests for Test run 1020074 *********************
2023-01-06T02:38:45.5642617Z Max attempts: 3; Current attempt: 3; Failed test cases threshold: 30; Failed test cases max limit: 0
2023-01-06T02:38:45.5643259Z [command]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe "@D:\a\_temp\mmb4aefltqf.tmp"
2023-01-06T02:38:45.6303664Z Microsoft (R) Test Execution Command Line Tool Version 17.4.1 (x64)
2023-01-06T02:38:45.6304576Z Copyright (c) Microsoft Corporation.  All rights reserved.
2023-01-06T02:38:45.6372454Z vstest.console.exe /TestCaseFilter:"FullyQualifiedName=CarRentalE2E.TestCases.RegressionTest.HomePageTest.RT_HomePageTest_Header_ProfileMenu.RT_HomePageTest_Header_ProfileMenu_03_VerifySignedInUserCanSwitchLocation(\"Canada\"\,\"CAN\"\,\"CarRental in Canada\"\,\"CarRental in Canada\")|FullyQualifiedName=CarRentalE2E.TestCases.RegressionTest.HomePageTest.RT_HomePageTest_Footer.RT_HomePageTest_Footer_04_VerifyFooterPDFDownloadLink(\"Modern Slavery Statement\"\,\"https://www.CarRental.com/492c0a/assets/local/about-CarRental/sustainability-and-corporate-responsibility/documents/2021/modern-slavery-and-human-trafficking-statement.pdf\"\,\"modern-slavery-and-human-trafficking-statement.pdf\")"
2023-01-06T02:38:45.6375473Z "D:\a\1\s\bin\Debug\net6.0\CarRentalE2E.dll"
2023-01-06T02:38:45.6377277Z /Settings:"D:\a\_temp\nre5sdzqr1u.tmp.runsettings"
2023-01-06T02:38:45.6377973Z /Logger:"trx"
2023-01-06T02:38:45.6378534Z /TestAdapterPath:"D:\a\1\s"
2023-01-06T02:38:45.8336674Z ##[error]The test source file "D:\a\1\s\in" provided was not found.
2023-01-06T02:38:45.8414632Z Vstest.console.exe exited with code 1.
2023-01-06T02:38:45.8416533Z **************** Completed test execution *********************
2023-01-06T02:38:45.8417576Z Test results files: D:\a\_temp\TestResults\VssAdministrator_fv-az294-712_2023-01-06_02_31_31.trx
2023-01-06T02:38:45.8453607Z Updating test results: 71
2023-01-06T02:38:45.8795093Z Publishing test results to test run '1020074'.
2023-01-06T02:38:45.9886569Z TestResults To Publish 71, Test run id:1020074
2023-01-06T02:38:45.9887577Z Test results publishing 71, remaining: 0. Test run id: 1020074
2023-01-06T02:38:46.4555418Z Updated test results: 71
2023-01-06T02:38:46.4556417Z Publishing Attachments: 1
2023-01-06T02:38:46.5137167Z ##[warning]This VssAdministrator_fv-az294-712_2023-01-06_02_31_31.trx already exists
2023-01-06T02:38:46.5141786Z Failed to upload run logs to LogStore, Trying to upload to FileService
2023-01-06T02:38:46.6804791Z ##[warning]Maximum number of attempts running the failed tests reached: 3
2023-01-06T02:38:46.7981828Z Execution Result Code 1 is non zero, checking for failed results
2023-01-06T02:38:46.8981075Z Completed TestExecution Model...
2023-01-06T02:38:46.9230084Z ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
2023-01-06T02:38:46.9233803Z ##[error]Error: The process 'D:\a\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.210.0\Modules\DTAExecutionHost.exe' failed with exit code 1
2023-01-06T02:38:46.9238400Z ##[error]Vstest failed with error. Check logs for failures. There might be failed tests.
2023-01-06T02:38:46.9365401Z ##[section]Finishing: Run test with VSTest runner on preproduct
2023-01-06T02:38:48.0757638Z ##[section]Starting: Checkout eri-e2e-automation-framework@main to s
2023-01-06T02:38:48.0922701Z ==============================================================================
2023-01-06T02:38:48.0923063Z Task         : Get sources
2023-01-06T02:38:48.0923436Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2023-01-06T02:38:48.0924030Z Version      : 1.0.0
2023-01-06T02:38:48.0924235Z Author       : Microsoft
2023-01-06T02:38:48.0924614Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2023-01-06T02:38:48.0925021Z ==============================================================================
2023-01-06T02:38:48.6457580Z Cleaning any cached credential from repository: eri-e2e-automation-framework (Git)
2023-01-06T02:38:48.6575737Z ##[section]Finishing: Checkout eri-e2e-automation-framework@main to s
2023-01-06T02:38:49.4556677Z ##[section]Starting: Finalize Job
2023-01-06T02:38:49.4594470Z Cleaning up task key
2023-01-06T02:38:49.4596439Z Start cleaning up orphan processes.
2023-01-06T02:38:49.4693129Z Terminate orphan process: pid (1392) (dotnet)
2023-01-06T02:38:49.4708435Z Terminate orphan process: pid (4740) (conhost)
2023-01-06T02:38:49.4718275Z ##[section]Finishing: Finalize Job
2023-01-06T02:38:49.4759404Z ##[section]Finishing: Run selenium tests on preproduct
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