Forum Discussion

dbrewer's avatar
dbrewer
Occasional Contributor
12 years ago

Exporting only failures from a log file, is this possible?

Currently our suite completes and generates the report/log as expected. But recently we've been manually marking down which ones are failing in an excel document/notepad document. Which made me wonder if there was a way to export the normal report/log we usually get, then just export the failures from the suite to a report/log/file.



Is this possible?
  • hlalumiere's avatar
    hlalumiere
    Regular Contributor
    The actual log is just one xml file. That should theoretically make it possible to just read and interpret the data, but instead of using XML as a DATA structure like it should be, Testcomplete insist on inventing itself a weirdo log format that cannot be flatly processed. To actually interpret the results you need images and scripts and widgets. Without them you can read timestamps and meaningless id's but thats about it.



    Here is an example... As you can see, no test name, description, actual status, or anything remotely useful in there...



    <?xml version="1.0" encoding="utf-8"?>

    <ProjectLog>

      <ProjectLogItem id="0" pid="-1" nety="False">

        <Status>file://///DEVSVR/TCLog/Common/5D0831A5AB0FEEC87839EF4722F99F06.gif</Status>

        <No>1</No>

        <Name><![CDATA[Element to be run]]></Name>

        <StartTime>2013-08-02 03:04:33</StartTime>

        <EndTime>2013-08-02 03:04:33</EndTime>

        <RunTime>0:00:00</RunTime>

        <Details></Details>

        <Messages>

          <MessagesItem id="0" pid="-1" nety="False">

            <Type>file://///DEVSVR/TCLog/Common/C476F5CE3CA13149E5BA62BD1DA275A5.gif</Type>

            <Message><![CDATA[The element to be run was not specified.]]></Message>

            <Priority><![CDATA[Normal]]></Priority>

            <Time>2013-08-02 03:04:33</Time>

            <ExtendedMessage isfilename="False"><![CDATA[]]></ExtendedMessage>

          </MessagesItem>

        </Messages>

      </ProjectLogItem>

    </ProjectLog>




    My advice is setup your own proper logging facility. Use events in testcomplete to insert/update rows in a database, SQL or otherwise.
  • dbrewer's avatar
    dbrewer
    Occasional Contributor
    That's starting to sound like the only way to go. 



    Thanks