anuj03 Absent Member.
Absent Member.
751 views

QTP Results

Hi All,

 

Is there any way to view the QTP results while the Test is still executing? My scripts are very long and take about 45mins to complete it, so if I could know that my script has failed after few steps, then I'll update my script and re-run it and save on time.

 

I am aware of Reporter.runstatus to check run status, but it doesn't work always and moreover I have to pause my script which sometimes causes failure.

 

Thanks,

 

0 Likes
12 Replies
Absent Member.. RoniRobinson Absent Member..
Absent Member..

Re: QTP Results

Perhaps you could sporatically place printf commands within your script. These would contain the status of the current step. This show during execution in a QTP log file window. Keep in mind that you will need to manually select tis file to view it while the script is running as it will go behind the application if it is running full screen.
0 Likes
anuj03 Absent Member.
Absent Member.

Re: QTP Results

Thanks Ron.

 

How do I get the QTP log file window.? Currently, when I run test I do not see any log window.

 

I apologize, I am newbie to QTP.

 

Thanks

0 Likes
Absent Member.. RoniRobinson Absent Member..
Absent Member..

Re: QTP Results

Using the printf command will automatically open the qtp log window.

0 Likes
anuj03 Absent Member.
Absent Member.

Re: QTP Results

Ron,

 

Isn't that printf works with Winrunner only? I am using QTP 9.5. I tried the following syntax

 

printf("name")

 

the error I got was - type mismatch 'printf'.

 

Really appreciate your help!

0 Likes
anuj03 Absent Member.
Absent Member.

Re: QTP Results

I got it!

 

Instead of printf used"Print"

 

Thanks for you help, really appreciate it!

 

0 Likes
Knowledge Partner
Knowledge Partner

Re: QTP Results

I periodically write status updates to a HTML page on a shared drive which I can view from another machine.

 

This help if the print window is 'hidden' or accidentally closed.

 

Mark Smith.

0 Likes
anuj03 Absent Member.
Absent Member.

Re: QTP Results

Hey Mark,

 

How do you do this - "I periodically write status updates to a HTML page on a shared drive which I can view from another machine."

 

Ideally this is something which I would like to achieve. Can you please help me with this.

 

Thanks

0 Likes
anuj03 Absent Member.
Absent Member.

Re: QTP Results

Hey mark,

 

I stumbled upon this link

http://h30499.www3.hp.com/t5/ITRC-Quality-Center-Forum/QTP-result-in-HTML-format/m-p/4180273#M2194

 

I tried code submitted by P V Suresh Babu  and I was getting error at line 14.

 

do u have any solution.

 

Appreciate your help

0 Likes
anuj03 Absent Member.
Absent Member.

Re: QTP Results

Mark,

 

After editing the source code , i got it to work. Now I have another question:-

 

1. When I run my script through QTP and point the results to the Quality center, then what will be the path of result.xml file?? Currently I point my results to temp folder and thus use the folder path in the code as

 

xmlSource.Load "C:\Documents and Settings\username\Local Settings\Temp\TempResults\Report\Results.xml"

 

Thanks again!!!

 

 

0 Likes
mohsenfi Absent Member.
Absent Member.

Re: QTP Results

The result is saved in your test case path on QC, something like "Subject\TESTCASE-path-in-TestPLAN-view"

At the same time there is also a temporary QC mapping folder on your local where all test related info are accessible, you can access the content when QTP is connected to QC: C:\Documents and Settings\your-user-name\Local Settings\Temp\TD_80\A-FOLDER-NANE\

0 Likes
anuj03 Absent Member.
Absent Member.

Re: QTP Results

 
Sorry for the delayed rep.
 
But, does this path has results.xml ? I didn't see any. Also, there is another problem, it creates a random folder name and since it is random and I have hardcoded the path of results.xml in my XmlToHtml.vbs file.
 
Do you have any suggestions?
 
Thanks!
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.