Forum Discussion

AmolGawali's avatar
AmolGawali
Occasional Contributor
2 months ago
Solved

How to integrate Testcomplete results with Azure Dashboards.

Hi everyone,

Iโ€™m working on TestComplete (v15.75) and have a working pipeline setup in Azure DevOps for test execution. I would like to integrate the test results generated by TestComplete into the Azure DevOps dashboard for better visibility and reporting.
Has anyone implemented this kind of integration? Any suggestions or best practices on how to achieve thisโ€”would be really helpful.

Thanks in advance!








8 Replies

  • Jimmie222's avatar
    Jimmie222
    Occasional Contributor

    <div>One good approach is to convert TestComplete results into a format Azure DevOps understands, like <strong>JUnit</strong> or <strong>TRX</strong>. These can then be published in the pipeline using the <code>PublishTestResults@2</code> task. This way, the results will appear in the "Tests" tab and can be visualized in dashboards.</div>

  • sally476pollard's avatar
    sally476pollard
    Occasional Visitor

    TestComplete has a 'JUnit' log format you can use for this purpose. Export your log summary in the JUnit format and use the 'PublishTestResults' task in the Azure DevOps pipeline. Isn't it! 

    • AmolGawali's avatar
      AmolGawali
      Occasional Contributor

      Yes, we have Junit log format but i am unable to export it... how do we need to export it through code.

      i.e. after completion of all test scripts it should get exported to a folder and then the task from a pipeline will pick it up and publish it to the azure dashboards.

      • scot1967's avatar
        scot1967
        Icon for Champion Level 2 rankChampion Level 2

        In the test code you would call 

        Log.SaveResultsAs(FileNameLogFormatExportVisualizerImagesLogScope)

        The 'LogFormat' would be a value of 5. The best way to do this is using the OnStopTest event in TestComplete.  The 'PublishTestResults' task article I mentioned will handle multiple files.

        Let us know how it goes!  ๐Ÿ˜Ž

        Handling Events
        https://support.smartbear.com/testcomplete/docs/testing-with/advanced/handling-events/index.html

        OnStopTest Event
        https://support.smartbear.com/testcomplete/docs/reference/events/onstoptest.html

        From the MS Article:

        # Publish Test Results v2
        # Publish test results to Azure Pipelines.
        - task: PublishTestResults@2
          inputs:
            testResultsFormat: 'JUnit' # 'JUnit' | 'NUnit' | 'VSTest' | 'XUnit' | 'CTest'. Alias: testRunner. Required. Test result format. Default: JUnit.
            testResultsFiles: '**/TEST-*.xml' # string. Required. Test results files. Default: **/TEST-*.xml.
            #searchFolder: '$(System.DefaultWorkingDirectory)' # string. Search folder. Default: $(System.DefaultWorkingDirectory).
            #mergeTestResults: false # boolean. Merge test results. Default: false.
            #failTaskOnFailedTests: false # boolean. Fail if there are test failures. Default: false.
            #failTaskOnFailureToPublishResults: false # boolean. Fail if there is failure in publishing test results. Default: false.
            #failTaskOnMissingResultsFile: false # boolean. Fail if no result files are found. Default: false.
            #testRunTitle: # string. Test run title. 
          # Advanced
            #buildPlatform: # string. Alias: platform. Build Platform. 
            #buildConfiguration: # string. Alias: configuration. Build Configuration. 
            #publishRunAttachments: true # boolean. Upload test results files. Default: true.

         

  • scot1967's avatar
    scot1967
    Icon for Champion Level 2 rankChampion Level 2

    This is a MS article describing the 'PublishTestResults' task and the supported filer types.  It would be awesome to hear how this comes out for you.  I am sure the community would benefit greatly from you sharing what you learn.  ๐Ÿ‘๐Ÿ‘๐Ÿ‘

     PublishTestResults@2 - Publish Test Results v2 task:
    https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-test-results-v2?view=azure-pipelines&tabs=trx%2Ctrxattachments%2Cyaml


    • AmolGawali's avatar
      AmolGawali
      Occasional Contributor

      Thanks, you so much scot for sharing this helpful information.!
      Now, i have only one task remaining is to get the JUnit format report from test complete using code.