Forum Discussion

mbeauchemin's avatar
mbeauchemin
New Contributor
2 years ago

Log.SaveResultsAs() does not appear to be saving results

I'm relatively new to TestComplete and am trying to export a JUnit summary after my test suite completes. The test suite executes automatically on a remote node so I cannot save the results manually. I have tried adding the following script test to perform the task:

 

def StoreJUnit():
    sPath = "C:\\<some path>\\test_summary.xml"

    # Store JUnit test results in the project directory
    Log.SaveResultsAs(sPath, lsJUnit, False, lesFull)

 

I can create .txt files in my test so I know it is executing but have been unable to produce the desired JUnit summary.

  • Hi Alex,

     

    .SaveResultAs() is returning false.

     

    However, I was able to solve this on the Jenkins side using:

     

    commandLineArguments: "/ExportSummary:${WORKSPACE}\\junit_results.xml"

     

    So I'm all good. I suppose I'm still curious why .SaveResultAs() isn't working, but It's not crucial.

     

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    .SaveResultsAs() returns True on success and False otherwise.

    What does it return in your case?

     

    • mbeauchemin's avatar
      mbeauchemin
      New Contributor

      Hi Alex,

       

      .SaveResultAs() is returning false.

       

      However, I was able to solve this on the Jenkins side using:

       

      commandLineArguments: "/ExportSummary:${WORKSPACE}\\junit_results.xml"

       

      So I'm all good. I suppose I'm still curious why .SaveResultAs() isn't working, but It's not crucial.