Forum Discussion

ANDRESIILVA's avatar
ANDRESIILVA
New Contributor
2 years ago

Error when executing Devops pipeline

I'm trying to run a pipeline that runs a test by test execute, when running the pipeline it opens testExecute but it's not opening the project.

Here is the path where my project is:

C:\agent_work\1\s\TestComplete\BusinessAutomacao\BusinessAutomacao.pjs

Project name: BusinessCSAutomacao

Now follow the Pipeline I created:

 

trigger:
- master

pool:
  name: TesteAutomatizado

steps:
  
- task: VisualStudioTestPlatformInstaller@1
  inputs:
    packageFeedSelector: 'nugetOrg'
    versionSelector: 'latestPreRelease'

- task: InstallTestCompleteAdapter@1
  inputs:
    accessKey: 'keyfake'
    logsLevel: '0'

- task: VSTest@2
  inputs:
    testSelector: 'testAssemblies'
    testAssemblyVer2: '**\TestComplete\BusinessAutomacao\BusinessAutomacao.pjs'
    searchFolder: '$(System.DefaultWorkingDirectory)'
    testFiltercriteria: 'Project=BusinessCSAutomacao'
    vsTestVersion: 'toolsInstaller'

 

In this example I didn't pass the accessKey I'm using
But when running the pipeline, the following error occurs:

Does anyone know how to resolve?

  • I would try specifying the whole path for testAssemblyVer2 and searchFolder to make sure they are resolving to the path you intend to use. 

    • YagoDaniel92's avatar
      YagoDaniel92
      Occasional Contributor

      In the testComplete manual, it only gives an example of a value for searchFolder, which is the default value

      I made the following change to the YAML code

       

      - task: VSTest@3
        inputs:
          testSelector: 'testAssemblies'
          testAssemblyVer2: 'C:\agent\_work\1\s\TestComplete\BusinessAutomacao\BusinessAutomacao.pjs'
          searchFolder: 'C:\agent\_work\1\s\TestComplete\BusinessAutomacao\'
          testFiltercriteria: 'Project=BusinessCSAutomacao'
          vsTestVersion: 'toolsInstaller'

       

      Now with this code, the Pipeline did not give an error, but it also did not run any tests

      I also don't know which path to put in the searchFolder because the manual only gives an example of the default path and with the default path an error occurs

       

      • Marsha_R's avatar
        Marsha_R
        Moderator

        I know you said that no tests ran, but did TestComplete give you an empty log or did it not have a log at all?

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I'm not sure if it had been mentioned in the other post, which I provided links for.

    • YagoDaniel92's avatar
      YagoDaniel92
      Occasional Contributor
      ##[error]Failed to get a list of tests from the "C:\agent\_work\1\s\TestComplete\BusinessAutomacao\BusinessAutomacao.pjs" file due to the following error: Unable to connect to TestExecute: TestExecute could not start within the timeout.
      ##[error]Unable to connect to TestComplete: TestComplete exited with unknown code 0.
       
    • YagoDaniel92's avatar
      YagoDaniel92
      Occasional Contributor

      I work at the same company as André, we are trying to make the Pipeline run the Tests through testExecut but so far we have not been able to run the tests through the pipeline.

      I'm looking at the link you sent but so far it hasn't resolved

      I didn't find any example on the internet of someone using searchFolder: '$(System.DefaultWorkingDirectory)' without this default value

      What path do I have to pass to the searchFolder?

    • YagoDaniel92's avatar
      YagoDaniel92
      Occasional Contributor

      Is there a way to change the version of the TestCompleteAdapter?
      The Version that is in Devops is 1.15054.12 I wanted to test with an older version

      I went back to the version of testComplete, now I wanted to test with an old version of TestCompleteAdapter

  • jkrolczy's avatar
    jkrolczy
    Regular Contributor

    Is your agent cmd window on the remote machine running as an admin or not as an admin ?