cancel
Showing results for 
Search instead for 
Did you mean: 

Log.SaveResultsAs Reporting Error for lsXML Option

SOLVED
MGN
Occasional Contributor

Log.SaveResultsAs Reporting Error for lsXML Option

Test Machine Information - VM running Windows 10, with TestComplete 14.1 installed, and coding in VBScript.

 

Was hoping to get some feedback to see if anyone else has had this issue.  When using the Log.SaveResultsAs method ( https://support.smartbear.com/testcomplete/docs/reference/project-objects/test-log/log/saveresultsas... ) to export to a folder location using the lsXML option, the full TestComplete log reports that the operation failed.  However, when I go to look at the folder it appears that all necessary files have been saved to the location.  From this I went and tested other Log.SaveResultsAs options, and none of those reported an error.  This included the lsZip option that saves the xml export files in a zip file.  Below is my sample code testing this functionality out.  From all of that, has anyone seen this occur for them when using the Log.SaveResultsAs lsXML option?

 

Sub testlogfunctions
Dim html_Path
Dim xml_Path
Dim mht_Path
Dim zip_Path
Dim packedhtml_Path

Call Log.Message("Post to log to have data for log save")
Call aqutils.Delay(500)
Call Log.SaveToDisk()
Call aqutils.Delay(500)
html_Path = "C:\TEMP\html_Folder\"
xml_Path = "C:\TEMP\xml_Folder\"
mht_Path = "C:\TEMP\mht_Folder\file.mht"
zip_Path = "C:\TEMP\zip_Folder\file.zip"
packedhtml_Path = "C:\TEMP\packedhtml_Folder\file.zip"

'lsXML = 0
If Log.SaveResultsAs(xml_Path, 0, False, 0) <> True Then
Log.Error("SaveResultsAs failed for XML")
Else
Log.Message("SaveResultsAs successful for XML")
End If
Call aqutils.Delay(500)

'lsHTML = 1
If Log.SaveResultsAs(html_Path, 1, False, 0) <> True Then
Log.Error("SaveResultsAs failed for HTML")
Else
Log.Message("SaveResultsAs successful for HTML")
End If
Call aqutils.Delay(500)

'lsMHT = 2
If Log.SaveResultsAs(mht_Path, 2, False, 0) <> True Then
Log.Error("SaveResultsAs failed for MHT")
Else
Log.Message("SaveResultsAs successful for MHT")
End If
Call aqutils.Delay(500)

'lsZip = 3
If Log.SaveResultsAs(zip_Path, 3, False, 0) <> True Then
Log.Error("SaveResultsAs failed for Zip")
Else
Log.Message("SaveResultsAs successful for Zip")
End If
Call aqutils.Delay(500)

'lsPackedHTML = 4
If Log.SaveResultsAs(packedhtml_Path, 4, False, 0) <> True Then
Log.Error("SaveResultsAs failed for Packed HTML")
Else
Log.Message("SaveResultsAs successful for Packed HTML")
End If
Call aqutils.Delay(500)

End Sub

1 ACCEPTED SOLUTION

Accepted Solutions
MGN
Occasional Contributor

Re: Log.SaveResultsAs Reporting Error for lsXML Option

The response I received from support was verifying the issue, with the potential reason possibly being that since I was specifying a folder path with the xml option that this doesn't actually generate a xml file, but rather the tclog file.  From that, since an xml file wasn't generated, the error was logged.  Since we aren't tied to using that method, we'll go forward with one of the others that don't log an error. 

 

And currently we are just trying to get up to version 14.1, so I would not know the functionality of this feature in 14.2.  

View solution in original post

4 REPLIES 4
Highlighted
Community Hero

Re: Log.SaveResultsAs Reporting Error for lsXML Option

I would contact Support directly for this question.  Here's the link:

https://support.smartbear.com/message/?prod=TestComplete

Community Hero

Re: Log.SaveResultsAs Reporting Error for lsXML Option

I've reproduced the problem just now on 14.1.  I'm upgrading my box to 14.2.  There was recently some corrections made in 14.2 to the SaveResultsAs method so I want to see if that was corrected at the same time.

 

As for @Jeanette787 What response did you get back from support?  


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Community Manager

Re: Log.SaveResultsAs Reporting Error for lsXML Option

Hi @MGN,

 

Does everything work ok in TestComplete 14.20?

 

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
MGN
Occasional Contributor

Re: Log.SaveResultsAs Reporting Error for lsXML Option

The response I received from support was verifying the issue, with the potential reason possibly being that since I was specifying a folder path with the xml option that this doesn't actually generate a xml file, but rather the tclog file.  From that, since an xml file wasn't generated, the error was logged.  Since we aren't tied to using that method, we'll go forward with one of the others that don't log an error. 

 

And currently we are just trying to get up to version 14.1, so I would not know the functionality of this feature in 14.2.  

View solution in original post

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors