cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Highlighted
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

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

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

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
[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
2 REPLIES 2
Community Hero

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

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
[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
Contributor

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

yeah...missed that part...sorry

New Here?
Join us and watch the welcome video:
Join the September Hub-bub to show off, learn and win