Posts: 240
Threads: 38
Joined: Jun 2009
Reputation:
0
08-12-2009, 05:38 PM
Hi All,
Could you please explain me about the exporting of QTP Test results in to HTML file using script (Not from the File menu)
Thanks,
Venkat.Batchu
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
08-12-2009, 06:02 PM
Manabh -
This is not exactly true. What you specified above is only a mere html log report and not a detailed execution report. There exist a code where you will need to read the XML values from the results.xml and using the Pdetail.xsl or Pshort.xsl stylesheets you can convert a xml result to a Html result format.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 61
Threads: 1
Joined: Jul 2009
Reputation:
0
08-12-2009, 06:12 PM
Basanth,
Have you tried this one out? If not then I request you to please try it out & then quote. I am using this feature quite frequently. As this html file is more easier to transfer, whenever I need to show step-by-step reslts, I can transfer this file.
As you see in regular QTP result in Tree format, this HTML displays the same in columner format. It contains Each & Every Step executed by QTP while executing the script with time flag & it's status (Pass/Fail/Done).
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
08-12-2009, 06:16 PM
Tried, used, dusted and abandoned. Why dont you try this on your script,
When you sync a object to wait, can you use a while loop for say 30 counters and see the result on the log file ? Morever the display is in a very tabular format and as i specified is not clear to read when you have enormous iterations hapening. If you have been adjusted to it, I am extremely sorry to wake up the monster. However, on a side-line try to read through a xml file and convert it using the XSL stylesheet and find the difference.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 61
Threads: 1
Joined: Jul 2009
Reputation:
0
08-12-2009, 06:31 PM
I have never said that it's a readable, I have said that it contains each & every step to what you have said "This is not exactly true. What you specified above is only a mere html log report and not a detailed execution report.".
Again I have stated that this is much more easier to handle/transfer due to it's size.
"If you have been adjusted to it, I am extremely sorry to wake up the monster.".
For this, It's not the matter of adjustment, It's the matter of using existing features of QTP easily, instead of making a Tool for a Tool.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
08-12-2009, 06:31 PM
Absolutely !! The feature cannot be ignored at any sense. This was made available to ensure that you have a quick Html report ready. However when your project size grows and you have huge scripts, this really becomes redundant. My only concern is, when you know that you can do it in a better way, then do it at first.
What i meant with the Sync is - In any applications when you try to use the waitproperty and you give say, 20 secs , the loop actually writes the number of times it iterated until it achieved the property. Imagine a script which may utilize this sync function to a larger extent. Your HTML log report simply becomes cumbersome to read through.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
08-12-2009, 06:56 PM
If I understood this right - you want to say that if I use waitproperty then it writes all the iteration into the results until it reaches the property.
I dont feel it behaves the way you suggested, I have just tried to get that but I am not able to find anything mis-behaved there. let me know if I am wrong some where. Just trying to understand what exactly the case could be.
I any case the log report will give you exact steps which are there in result viewer.
Posts: 61
Threads: 1
Joined: Jul 2009
Reputation:
0
08-12-2009, 07:18 PM
Yes, this is true, unless you don't report any thing or your statement doesn't include any QTP action statements (i.e. "Exists", "Set", "Get", "Sync"), QTP won't report these statements in report. If you loop for 30 iterations without any QTP action statements in it, you can't get anything from results that you have iterated for n number of times.