Forum Discussion

maheshj's avatar
maheshj
New Contributor
5 years ago

Failed to get a list of tests

I have integrated  TestComplete with Azure devops and while running pipeline job getting below error

 

 

##[error]Failed to get a list of tests from the "C:\tmp\vsts-agent-win-x64-2.165.2\_work\1\s\AutomatedTests\TestProject1.pjs" file due to the following error: Unable to connect to TestComplete: it is running with different rights, or its state is incorrect. Please close it and try again.

  • Sorry Wamboo,

    It was my fault. My TestComplete application was open during the test execution.

    Now it's working without any issue.

     

    Thank You.

  • Wamboo's avatar
    Wamboo
    Community Hero

    Hi mahesj

     

    Do You have any more logs for this? did You try to run it by testexecute?

    • maheshj's avatar
      maheshj
      New Contributor

      Sorry Wamboo,

      It was my fault. My TestComplete application was open during the test execution.

      Now it's working without any issue.

       

      Thank You.

    • maheshj's avatar
      maheshj
      New Contributor

      Thanks Wamboo.

       

      Below are the execution logs, please find error below the line "Starting test execution, please wait..."

      2020-04-20T00:24:47.3115811Z DtaExecutionHost version 18.167.29920.1.
      2020-04-20T00:24:47.5806051Z Starting TestExecution Model...
      2020-04-20T00:24:49.7771209Z Result Attachments will be stored in LogStore
      2020-04-20T00:24:49.8803314Z Run Attachments will be stored in LogStore
      2020-04-20T00:24:49.8886267Z Result Attachments will be stored in LogStore
      2020-04-20T00:24:50.0019076Z Result Attachments will be stored in LogStore
      2020-04-20T00:24:50.0019905Z Run Attachments will be stored in LogStore
      2020-04-20T00:24:50.0265764Z Updated Run Settings:
      2020-04-20T00:24:50.0289191Z <RunSettings>
      2020-04-20T00:24:50.0294802Z   <RunConfiguration>
      2020-04-20T00:24:50.0295321Z     <BatchSize>1000</BatchSize>
      2020-04-20T00:24:50.0295843Z     <ResultsDirectory>C:\tes\vsts-agent-win-x64-2.165.2\_work\_temp\TestResults</ResultsDirectory>
      2020-04-20T00:24:50.0296269Z   </RunConfiguration>
      2020-04-20T00:24:50.0296558Z </RunSettings>
      2020-04-20T00:24:50.0400899Z **************** Starting test execution *********************
      2020-04-20T00:24:50.0525321Z [command]C:\tes\vsts-agent-win-x64-2.165.2\_work\_tool\VsTest\16.6.0-preview-20200318-01\x64\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe "@C:\tes\vsts-agent-win-x64-2.165.2\_work\_temp\tznyjjjc2yn.tmp"
      2020-04-20T00:24:50.4465901Z Microsoft (R) Test Execution Command Line Tool Version 16.6.0-preview-20200318-01
      2020-04-20T00:24:50.4468061Z Copyright (c) Microsoft Corporation.  All rights reserved.
      2020-04-20T00:24:50.4549717Z vstest.console.exe "C:\tes\vsts-agent-win-x64-2.165.2\_work\1\s\DemoTesting\DemoTesting.pjs"
      2020-04-20T00:24:50.4550585Z /Settings:"C:\tes\vsts-agent-win-x64-2.165.2\_work\_temp\e4yyf4m5iyu.tmp.runsettings"
      2020-04-20T00:24:50.4550948Z /Logger:"trx"
      2020-04-20T00:24:50.4551225Z /TestAdapterPath:"C:\tes\vsts-agent-win-x64-2.165.2\_work\1\s"
      2020-04-20T00:24:50.8404950Z Starting test execution, please wait...
      2020-04-20T00:24:50.9238796Z A total of 1 test files matched the specified pattern.
      2020-04-20T00:25:02.3521534Z ##[error]Failed to get a list of tests from the "C:\tes\vsts-agent-win-x64-2.165.2\_work\1\s\DemoTesting\DemoTesting.pjs" file due to the following error: Unable to connect to TestComplete: it is running with different rights, or its state is incorrect. Please close it and try again.
      2020-04-20T00:25:02.3530680Z No test is available in C:\tes\vsts-agent-win-x64-2.165.2\_work\1\s\DemoTesting\DemoTesting.pjs. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
      2020-04-20T00:25:02.3779219Z Results File: C:\tes\vsts-agent-win-x64-2.165.2\_work\_temp\TestResults\maheshj_U5-DPE-CPB-0221_2020-04-20_05_55_02.trx
      2020-04-20T00:25:02.3823860Z ##[error]Test Run Failed.
      2020-04-20T00:25:02.4116326Z Vstest.console.exe exited with code 1.
      2020-04-20T00:25:02.4117184Z **************** Completed test execution *********************
      2020-04-20T00:25:02.4196391Z Test results files: C:\tes\vsts-agent-win-x64-2.165.2\_work\_temp\TestResults\maheshj_U5-DPE-CPB-0221_2020-04-20_05_55_02.trx
      2020-04-20T00:25:02.4546035Z No Result Found to Publish 'C:\tes\vsts-agent-win-x64-2.165.2\_work\_temp\TestResults\maheshj_U5-DPE-CPB-0221_2020-04-20_05_55_02.trx'.
      2020-04-20T00:25:03.1148367Z Created test run: 36
      2020-04-20T00:25:03.1149389Z Publishing test results: 0
      2020-04-20T00:25:03.2765286Z Publishing test results to test run '36'.
      2020-04-20T00:25:03.2791748Z TestResults To Publish 0, Test run id:36
      2020-04-20T00:25:03.2792188Z Published test results: 0
      2020-04-20T00:25:03.2799204Z Publishing Attachments: 1
      2020-04-20T00:25:05.1310159Z Execution Result Code 1 is non zero, checking for failed results
      2020-04-20T00:25:05.3455854Z Completed TestExecution Model...
      2020-04-20T00:25:05.3994142Z ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
      2020-04-20T00:25:05.3996935Z ##[error]Error: The process 'C:\tes\vsts-agent-win-x64-2.165.2\_work\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.167.1\Modules\DTAExecutionHost.exe' failed with exit code 1
      2020-04-20T00:25:05.4014185Z ##[error]Vstest failed with error. Check logs for failures. There might be failed tests.
      2020-04-20T00:25:05.4104147Z ##[section]Finishing: VsTest - testAssemblies