cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Occasional Contributor

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

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

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.

 

 


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
Vegas Thrill Rider
Extensions available

View solution in original post

9 REPLIES 9
Highlighted
Community Leader

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

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?

Highlighted
Community Hero

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

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.

 

 


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
Vegas Thrill Rider
Extensions available

View solution in original post

Highlighted
Occasional Contributor

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

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. 

Highlighted
Community Hero

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

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?


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
Vegas Thrill Rider
Extensions available
Highlighted
Occasional Contributor

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

I agree Message IDs are unique for the run, but it is not helpful for me. I want some property associated with each message which remains unchanged during multiple runs.
I want to generate report out of it, mentioned in updated question.

Highlighted
Occasional Contributor

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

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.

 

Is it possible in TC to have own defined structure for XML log? Can you please elaborate "Own log records"?

Highlighted
Community Hero

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

No, TC log structure (the XML) is part of TC.  You can't modifiy it.

 

As for "own log records"... these are any records created using the "Log" operation in keyword tests.  If you're not explicitly logging, then it's all the automatic stuff created by TC.  


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
Vegas Thrill Rider
Extensions available
Highlighted
Community Hero

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

Hi,

 

https://support.smartbear.com/testcomplete/docs/testing-with/log/working-with/exporting/structure.ht...

Does it help somehow?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Highlighted
Community Manager

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

Thank you everyone!

 

@TCU100 , were you able to solve this with all the advice from the Community?


Sonya Mihaljova
Community and Education Specialist

 Join the virtual SmartBear Connect user conference on April 27-28! Get your free virtual ticket today!