1
votes

Setup:

  1. VS CI build configured (pass)
  2. Deploy TestAgent on VM (pass)
  3. AzureVM File Copy (pass)
  4. Run Functional Tests - Selenium (broken)

Here are the logs/errors that I see when this build step executes:

  • Preparing task execution handler.
  • Executing the powershell script: d:\a_tasks\RunVisualStudioTestsusingTestAgent_d353d6a2-e361-4a8f-8d8c-123bebb71028\1.0.52\RunDistributedTests.ps1
  • DistributedTests: Environment WinRm Protocol HTTPS.
  • DistributedTests: Task 'CheckTACompat' on machine 'AzureVM.canadacentral.cloudapp.azure.com:5986' is being run
  • DistributedTests: Task 'CheckTACompat' on machine 'AzureVM.canadacentral.cloudapp.azure.com:5986' completed.
  • DistributedTests: Creating run for selected test plan with following parameters
  • DistributedTests: Test plan ID: 15
  • DistributedTests: Test suite ID: 16,18
  • DistributedTests: Test configuration ID: 3
  • DistributedTests: Run title: Selenium Test Run
  • DistributedTests: is automated: True
  • DistributedTests: test settings id : 38
  • DistributedTests: build location: C:\seleniumwd\seleniumtestproject\bin\debug\
  • DistributedTests: build id: 70
  • DistributedTests: test configuration mapping:
  • DistributedTests: Test Run with Id 41 Queued
  • DistributedTests: Please use this link to analyze the test run :
  • <>
  • DistributedTests: Test run '41' is in 'InProgress' state.
  • DistributedTests: Total Tests : 2, Passed Tests : 0
  • DistributedTests: Test run '41' is in 'Aborted' state.
  • DistributedTests: Total Tests : 2, Passed Tests : 0
  • DistributedTests: Test run is aborted. Logging details of the run logs.
  • DistributedTests: New test run created.
  • Test Run queued for Project Collection Build Service (App Service).
  • DistributedTests: Test execution started. Test run id : 41
  • DistributedTests: UnExpected error occured during test execution. Try again.
  • DistributedTests: Error : One or more errors occurred.--->No test assemblies found on the test machine matching the source filter criteria or no tests discovered matching test filter criteria. Verify that test assemblies are present on the machine and test filter criteria is correct.
  • DistributedTests: Test run aborted. Test run id: 41 System.Exception: The test run was aborted, failing the task. PowerShell script completed with 1 errors.

In my Azure File copy task I have this: Source: $/baseproject/SeleniumTestProject1 Destination Folder: C:\seleniumwd\seleniumtestproject\

If I go to the Azure VM and look at that destination folder, I see the following files/folders inside

  • bin
  • obj
  • Properties
  • Packages
  • 3 C# selenium tests (.cs)
  • 1 test project (seleniumTestProject)

bin/debug/ on the test agent contains the test project dll (SeleniumTestProject.dll) and all the dlls and webdriver files.

obj/debug/ on the test agent contains the test project dll (SeleniumTestProject.dll) and some text and cache files

When I point the Run Functional Tests task at either of the above folders, I get the error mentioned earlier.

If I switch the test task to use Assemblies instead of test plan I am still not successful.

Any ideas how to properly point to the assemblies?

1
Could you provide the detail log here or share it on the OneDrive? What's the detail setting of Run functional test?starian chen-MSFT
Details of "Run Functional Tests" *Test Drop Location - Folder from Azure copy *Test Selection - Test Plan * Test Plan - 001 Test Plan * Test Suite - 001 Test Plan, 001 Test Plan\74: As a user I want to * Test Configuration - Windows 10 * Code Coverage - EnabledGIZNAJ
Which folder to we want to point the test task @? Do we point it to the folder that contains the drivers and dlls, or the folder that contains the .cs files?GIZNAJ
I don't have a lot of build minutes left this month so that is why I'm selective when I build while we troubleshoot.GIZNAJ

1 Answers

2
votes

The error is exactly what it says that there were some missing test assemblies found in the test drop location. I will post bullet points of things that I troubleshooted and confirmed while working on this issue.

ISSUES

  • MTM tests were linked to some selenium tests and some unit tests
  • If there are test cases that are linked to unit tests or selenium tests that don't exist, you will get this error. All tests that are part of the plan must have an associated test that is in the test drop location
  • There are some issues with the Azure copy as some of the .cs files are not being included in the copy (part of the original problem)

TIPS

  • While initially setting up this test task you might set the timeout to 0. I've seen times where there are selenium tests still being run and the task times out
  • Select a test plan that has a few manual tests and linked selenium tests while initially setting up this task. This will ensure you get to see one complete
  • 1 failed selenium test in the task will fail the task
  • You don't need to set up the agent for "Interactive Mode"