Forum Discussion

p_vd_berg's avatar
p_vd_berg
Occasional Contributor
14 years ago

Save output data to txt file

Is it possible to export values that are returned during a test into a txt file?

I know that you can put all the data you want into the log file, but in the log there is a lot of redundant information.

4 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    There are ways to minimize what goes into the log automatically so if you can define what you mean by redundant information, we can probably help with that.



    In the meantime, you can use aqFile methods to create and output values to text files.  There are some examples in the help that demonstrate how to output to a text file.
  • p_vd_berg's avatar
    p_vd_berg
    Occasional Contributor
    i'am using keyword tests. I'm using TestComplete about 3 days now so it's al new.

    The log files saves al the event data like Windows was clicked with left mous button.

    I have to filter it so it only show messages. But I want all the messages in 1 txt file.

    Is it possible to use the aqFile method in a Keyword test?

    Thanks for the quick awnser!

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Let me answer your questions one at a time. :-)



    The log files saves al the event data like Windows was clicked with left mous button.



    I have to filter it so it only show messages. But I want all the messages in 1 txt file.




    In TestComplete, under Tools | Current Project Properties | Playback, there's an option (displayed in screenshot below) to limit the number of events showing in the log file.  What should happen with that value set is that, in the log, you will only get Messages so long as there are no warnings or errors.  If there is a warning or error, the last x number of events (as indicated by the option), will be logged as well to assist in debugging what went wrong.  Set this value to a non-zero number and that should help "clean up" your log.



    Is it possible to use the aqFile method in a Keyword test?




    Yes, it is.  You will have to use the Call Object Method operation to call the methods on the aqFile object, but it's doable.