Forum Discussion

omensio's avatar
omensio
Contributor
15 years ago

Writing to the TestCase Log and getting that log back to file in Groovy script

Hi,
i'm trying to find out the easiest way to write to the TestCase Log (own verification points to the same place as testrunner is written its own verdicts ) and getting the log later on into the String variable in order to write it into own test log file.

Olli

4 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    Unfortunately this is not possible. The TestCase log isn't an ordinary log, it is a view of all the completed teststeps and as such it isn't possible to add custom items to it. Would it be possible for you to use the Groovy log instead?

    Regards,
    Dain
    eviware support
  • Okay,
    is it possible to read the Test Case Log and add that to  own log  eg. get whole log into a variable in Groovy.

    Olli
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    the testcase log is just a view for the results array available from the testRunner.results property, so you could create a similar output using that data for your content..

    regards,

    /Ole
    eviware.com
    • Nilesh's avatar
      Nilesh
      Occasional Contributor

      Dear Smart-bear_Support

      I am bit new to ready API and groovy scripting, can you please elaborate how to use the step you have mentioned above?