Ask a Question

Log error (instead of info) when aqFile.Copy fails

SOLVED
daniel_dewinter
Contributor

Log error (instead of info) when aqFile.Copy fails

Hello,

 

I'm using aqFile.Copy method to copy some file.

Sometimes the copy action fails (file server/nas unavailable) and a Information Message is send

 

as stated in the Remarks here: https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqfile/copy.html  

  • If the method fails to copy the file, TestComplete will post an information message to the test log explaining the cause of the failure.

 

The problem I have with this, is that you won't notice it in TestComplete's log. A few test cases later, something fails, but the rootcaus is not clear immediately

 

Question, does anybody know if there's an alternative method that actually raises an error when copying of the file fails

 

Regards,

Daniel

 

 

 

2 REPLIES 2
tristaanogre
Esteemed Contributor

The method returns a boolean true or false as well.  Assign the result of the method to a variable and do an if/then logic on the value.  If true, do nothing.  If false, log an error or a warning to the test log indicating that the copy failed.  


Robert Martin
[Hall of Fame]
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
Vegas Thrill Rider
Extensions available
daniel_dewinter
Contributor

yeah...missed that part...sorry

cancel
Showing results for 
Search instead for 
Did you mean: