Forum Discussion

jesseejames's avatar
jesseejames
Occasional Contributor
2 years ago

TestComplete run test in Azure pipeline successfully but no result

I try to run a simple TestComplete UI test (open google in browser and search something), and run as part of Azure Pipelines, so I followed the documentation on "Run TestComplete Tests as Part of Pipeline"(Run TestComplete Tests as Part of a Pipeline | TestComplete Documentation (smartbear.com))

I created a pipeline, with self-hosted agent (also try it in interactive agent)

Added a "Visual Studio Test" task, using "Test assemblies", try to find all **\*.pjs files 

 

The task did run successfully, it tries to run the .pjs files, and it did find "A total of 1 test files matched the specified pattern."

and it did publish the test result, create a test run, successfully.

But, it actually didn't run any test, 0/0 test has been executed. The test result is empty. 

 

I have attached screen shot to help explain the issue.

I thank you in advance and appreciate any advice at this point. 

11 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I do have to ask...does your project contain any tests and execution plan!?

  • jesseejames's avatar
    jesseejames
    Occasional Contributor

    yes, it does have some simple tests, (open browser and search Google.com, search something and hit enter ), I can run the test manually in the self hosted agent, but it just can't be run by azure pipeline, (or it did run, but just not run the actual test)

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Hi,

       

      Just to be on the safe side - can you double-check and confirm that interactive user session exists on the agent machine when the agent runs the test? (I.e. whether the agent was configured to start and execute as an application, not as a service.)

       

      • jesseejames's avatar
        jesseejames
        Occasional Contributor

        hi AlexKaras, thank you for your response, yes I can confirm the interactive user session is being used during the testing. It does run as part of the pipeline, we can see timestamp of agent is running, it just the actual test is not executed.


        I can manually run the test in the agent, and it runs fine. 

        I can also use command line to execute "TestComplete.exe "E:\azagent-staging\_work\r1\a\_TCPipelineTest\drop\TestProject1\TestProject1.pjs" /r /p:TestProject1"

         

        please advice how to trouble shoot, thank you.

    • jesseejames's avatar
      jesseejames
      Occasional Contributor

      Hi yes I can verify the TestResult has file, some "xxxx_xxxx_timestamp.trx" file with only 2k size, and 0/0 test being run.

       

      what other reason could cause the test Not being run?? 

    • jesseejames's avatar
      jesseejames
      Occasional Contributor

      Yes and no. The test result trx file does exist, but it said "0/0 tests has been run". So I would think the test actually didn't get run. 

       

      if it did run, then it supposed to said "2/2 test has been run"... or something like that. 

  • alli-bri's avatar
    alli-bri
    New Contributor

    I'm experiencing the issue too. Has anyone sorted out this problem?