Forum Discussion

TCU100's avatar
TCU100
Occasional Contributor
5 years ago
Solved

How to uniquely identify TestComplete Testcase operation output in multiple XML logs.

I have a requirement to uniquely identify testcase messages in TestComplete XML log output ( XML Log, generated by TC in the end of Test Suite execution). I will parse these log files and generate a report from it.

In XML Log each element (project suite, project, testcase) has options to identify any of this element uniquely (using monikers and persistent keys), in different XML logs generated by executing Test Suite multiple times.

I do not see a concrete option to identify a Test Case log message in multiple executions. Is there an option to achieve this?

Scenario-

  1. A) I have a testcase with two operations. In Project suite XML log, I see xml nodes as message 0, message 1 for both operations (I wish TC would have unique identifiers (Monikers and persistent keys) for each message).
  2. B) If I modify testcase by adding another operation in between operation 0 and 1, upon execution output XML log will show three messages message 0, message 1 and message 2.

By looking at message 1 in A and B execution outcomes, how to find out if  “message 1” is same if both runs or not?

  • The "messages" you see are the event logging of the actions being performed.  Basically, each step that you do in the test potentially could write a record to the log.  If you don't deliberately make effort to write your own log records, organize your tests, etc., then that's all you're going to get in the log... a massive, long list of events.  It's a log, not a report.

     

     

9 Replies

  • Wamboo's avatar
    Wamboo
    Community Hero

    I'm sorry, but I don't understand what you're trying to investigate.

     

    Can you write more details?

     

    Are You creating Your own .xml or You mean the main TestComplete at the end?

     

    Are You parsing somehow the 'App\Log\*' files?

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      The "messages" you see are the event logging of the actions being performed.  Basically, each step that you do in the test potentially could write a record to the log.  If you don't deliberately make effort to write your own log records, organize your tests, etc., then that's all you're going to get in the log... a massive, long list of events.  It's a log, not a report.

       

       

    • TCU100's avatar
      TCU100
      Occasional Contributor

      I am trying to parse XML log files, generate by TC after TestSuite execution.
      I can locate any project suite, project and test case by using their persistent key among multiple outputs, how can I find any testcase message among multiple executions? Message ID is just a node locater but it doesn`t necessarily tells if it’s the same. See updated question for details. 

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        I don't know for certain... but I think the message IDs are uniquely generated each run.  So you're not going to be able to use a key or ID to tell the difference.  You're going to have to go by type of message (event, error, warning, message, checkpoint, etc.) and the actual content of the message.

         

        Question:

        Why are you attempting to parse out the XML of the TC log file?  What's you're ultimate end goal?