Some time back I faced a situation where my QTP stopped responding and I had to close it forcefully. To get some help on what exactly was going on, I went to results file. But I was not able to browse through it. It was showing an incompatibility error.

incompatibility error QTP(Click To Enlarge)

These results were generated with a later version of QuickTest Professional. To view these results, install a later version of QuickTest Professional or the Test Results Viewer.

I observed that the two files which gets affected in such cases are Results.xml and GeneralInfo.ini

Results.xml – contains all the test result data in the structured format. Due to abnormal closing of QTP, some tags in this xml file does not close properly, due to which test result viewer is not able to read it properly.

GeneralInfo.ini – once QTP execution is successfully done, it creates this ini file which initiates the result viewer and contains the required information to populate the result.

So whenever you get such an error, go to your result path (report folder). You will notice that there is no general info file has been created. In case it is there trying opening in notepad. You will find that no data is there. That means you will have to create this file in order to view the result.

Create a txt file in your report folder name it as ‘GeneralInfo.ini’ and Open it in notepad.

Write the text mentioned below –

[General] ‘ini file tag. Keep this intact
Product= ‘name of the product which will be QuickTest Professional
Version = ‘Version of your QTP
Total = ‘the number of total lines in the xml file for result (explained below)
Title= ‘Script Title
OSVersion = ‘version of operating system
TestLocation= ‘Test Path

Parameter ‘Total’ can be retrieved from the incomplete results.xml file.

Open the file in any file editor. Go to the end of the file. Search the first tag which contains <Step rID “>from bottom.You will see a value assigned there to rID as in the below piece of xml.

<Step rID="T762">
<Obj ><![CDATA[Test Status]]></Obj>
<Details ><![CDATA[Expected Result : Script run complete.
Actual Result : Script run completed.]]></Details>
<Time><![CDATA[2/4/2010 - 17:59:32]]>

Eliminate the character ‘T’ from the value and the value you get is the total lines.

Here is an example of general info file.

[General]
Product=QuickTest Professional
Version = 10.0
Total = 762
Title= Test1 [Test1]
OSVersion = 7
TestLocation=C:\QTP\Tests\Script\Test1

This is just a typical example of this ini file, there may be more than these parameters in your general info file depending on the products installed at your system like the snapshot below. I would recommend you to just have a look for the parameters in the ini file of a successful run and create a new one accordingly.

GeneralInfo.ini File

Quick QTP tip by Saket.