The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP/Mercury QuickTest Pro

Pages: 1 | 2 | 3 | 4 | >> (show all)
Mahi_v
Member


Reged: 02/06/07
Posts: 61
How to Export test results to HTML file in QTP
      #378874 - 05/08/07 05:55 AM


hi,
How to Export test results to HTML file in QTP?
pls send the script or give some idea.

Thanks in advance,
Mahi.


Post Extras: Print Post   Remind Me!   Notify Moderator  
TmReddy
Advanced Member


Reged: 02/01/07
Posts: 456
Loc: Pittsburgh, USA
Re: How to Export test results to HTML file in QTP [Re: Mahi_v]
      #378882 - 05/08/07 06:08 AM

File->ExportTo HTML File(from the results window)

Post Extras: Print Post   Remind Me!   Notify Moderator  
Mahi_v
Member


Reged: 02/06/07
Posts: 61
Re: How to Export test results to HTML file in QTP [Re: TmReddy]
      #378885 - 05/08/07 06:20 AM

I know that.
I am asking, using Script how we do automatically.
or any settings is there to do automatically.


Post Extras: Print Post   Remind Me!   Notify Moderator  
RKY
stranger


Reged: 08/22/06
Posts: 586
Loc: Bangalore, India
Re: How to Export test results to HTML file in QTP [Re: TmReddy]
      #378890 - 05/08/07 06:25 AM

Check the below Link and find the code

Page Link

In the code you need to provide the XSL file name. In QTP you will find 3 XSL files. find the XSL file under the QTP installation folder \ dat \ <Here>. File starts with PDetails for Detailed report and PShort for short report, Update the appropriate XSL in the code, and last specify the Html output filename and location.

I hope this will help for you,

--------------------

Hope this helps you,


- RKY


Post Extras: Print Post   Remind Me!   Notify Moderator  
RKY
stranger


Reged: 08/22/06
Posts: 586
Loc: Bangalore, India
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #378892 - 05/08/07 06:27 AM

Before that Keep in mind you need to call this function once QTP done with execution, then only Results.xml file will generate until that file Results.xml wont generate

--------------------

Hope this helps you,


- RKY


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mahi_v
Member


Reged: 02/06/07
Posts: 61
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #379084 - 05/08/07 09:38 PM

I didn't find QTP installation folder.
where it is located.


I am using frame work for testing SAP modules.
After running all the scripts , the test results window will come. i want to convert that test results window as a HTML file and export to report folder.


Post Extras: Print Post   Remind Me!   Notify Moderator  
RKY
stranger


Reged: 08/22/06
Posts: 586
Loc: Bangalore, India
Re: How to Export test results to HTML file in QTP [Re: Mahi_v]
      #379088 - 05/08/07 09:59 PM



Mahi

what i exactly referring as Go to QTP installation folder under that go to Dat foldet ,there you could find the as above said XSL files.

I hope this will make more sense

--------------------

Hope this helps you,


- RKY


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mahi_v
Member


Reged: 02/06/07
Posts: 61
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #379091 - 05/08/07 10:22 PM

Thank u buddy. i Found PDetails.xls file.
that file contains the following code. here what i need to change , to get the html report automatically and store it in the results folder

[Tarun] -> No need to paste such a large XML when everyone having QTP will be able to get the XML.

Edited by Tarun Lalwani (05/08/07 11:46 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Jits
Advanced Member


Reged: 01/31/07
Posts: 492
Loc: Pune, India
Re: How to Export test results to HTML file in QTP [Re: Mahi_v]
      #379101 - 05/08/07 11:26 PM

You can attach as file rather then copying here!!

Post Extras: Print Post   Remind Me!   Notify Moderator  
Dipika
Member


Reged: 01/02/07
Posts: 261
Loc: Central India
Re: How to Export test results to HTML file in QTP [Re: TmReddy]
      #379179 - 05/09/07 05:23 AM

I tried with this but ,when I opened it with Browser(IE),it just displayed

Report
Test:

That's all.

Please tell me how to do this task.
Dipika


Post Extras: Print Post   Remind Me!   Notify Moderator  
RKY
stranger


Reged: 08/22/06
Posts: 586
Loc: Bangalore, India
Re: How to Export test results to HTML file in QTP [Re: Dipika]
      #379219 - 05/09/07 06:41 AM

Dipika

Look into the all posts in the thread which is said above and copy the Vb script code from the link which is specified and replace the appropriate XSL file and execute you will get the HTML report.

--------------------

Hope this helps you,


- RKY


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dipika
Member


Reged: 01/02/07
Posts: 261
Loc: Central India
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #379470 - 05/09/07 10:43 PM

I save the results by exporting it to the HTML File.After going through your response,I opened it in the notepad.This is what is displayed
------------------------------------------------------------------
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-16">
<title Localizable_1="True"> Report</title>
<link rel="stylesheet" type="text/css" href="PResults.css">
</head>
<body bgcolor="#ffffff" leftmargin="0" marginwidth="20" topmargin="10" marginheight="10" vlink="#9966cc">
<center>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="hl_qt">
<div align="center"><span class="hl_qt" Localizable_1="True">Report</span></div>
</td>
</tr>
<tr>
<td class="hl0">
<p><span class="hl0_name" Localizable="True">Test:</span><span class="hl0"></span></p>
</td>
</tr>
</table><br></center>
</body>
</html>
---------------------------------------------------
I copied the entire code and pasted in this file .when I refresh it It gives me this thing.It gives me error on the page.may be I have not got wat u were trying to say or may be i have done things in a wrong manner,Plz help me out


Post Extras: Print Post   Remind Me!   Notify Moderator  
RKY
stranger


Reged: 08/22/06
Posts: 586
Loc: Bangalore, India
Re: How to Export test results to HTML file in QTP [Re: Dipika]
      #379591 - 05/10/07 05:24 AM


Dipika

You have to Update the Corrosponding XSL file as ...\PDEtails.XSL in the Code which is available in the supplied as Link ,Supply the XML file as your result ...\Results.XMl and Target file as "C:\Test.html" you will get the HTML file

I hope this will more sense for you

--------------------

Hope this helps you,


- RKY


Post Extras: Print Post   Remind Me!   Notify Moderator  
miraz2007
Newbie


Reged: 05/07/07
Posts: 23
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #379663 - 05/10/07 07:56 AM

Could anyone provide detail step's for this.


Thanks
Narendra singh


Post Extras: Print Post   Remind Me!   Notify Moderator  
RKY
stranger


Reged: 08/22/06
Posts: 586
Loc: Bangalore, India
Re: How to Export test results to HTML file in QTP [Re: miraz2007]
      #379846 - 05/10/07 07:38 PM


Narendra singh

Here it is explained more than that you are expecting. Look into that thread from the beginning.

I hope this will help for you

--------------------

Hope this helps you,


- RKY


Post Extras: Print Post   Remind Me!   Notify Moderator  
miraz2007
Newbie


Reged: 05/07/07
Posts: 23
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #380140 - 05/11/07 11:18 AM

Ram

I got that XSL file but just i want to know that, what i need to change into that XSL files and how can get the html report automatically after the test execution.

Do i need to writ a code for that.Please provide details regarding this.

Thanks
Narendra


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dipika
Member


Reged: 01/02/07
Posts: 261
Loc: Central India
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #380332 - 05/13/07 09:36 PM

Dear Jeff,

If u don't mind,could u be more descriptive ,Bcoz I am not able to do it.It will be very generous on yr part if u help me out in doing this task


Post Extras: Print Post   Remind Me!   Notify Moderator  
RKY
stranger


Reged: 08/22/06
Posts: 586
Loc: Bangalore, India
Re: How to Export test results to HTML file in QTP [Re: Dipika]
      #380333 - 05/13/07 09:46 PM Attachment (719 downloads)

Dipika

I have attached the code. look into that code line by line. Update appropriate input value as per your settings and run the code

I hope this will make more sense for you

--------------------

Hope this helps you,


- RKY


Edited by Jeff_Hardy (05/13/07 09:47 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dipika
Member


Reged: 01/02/07
Posts: 261
Loc: Central India
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #380365 - 05/14/07 12:35 AM

Dear Jeff,
I think Its the same code with which I have been trying uptill now.U have to tell me where(in which file) I have to keep this code ,so that I get the desired Response


Post Extras: Print Post   Remind Me!   Notify Moderator  
RKY
stranger


Reged: 08/22/06
Posts: 586
Loc: Bangalore, India
Re: How to Export test results to HTML file in QTP [Re: Dipika]
      #380379 - 05/14/07 01:08 AM


Copy the entire code and paste into QTP Editor and run it(with updated values)

--------------------

Hope this helps you,


- RKY


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dipika
Member


Reged: 01/02/07
Posts: 261
Loc: Central India
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #380413 - 05/14/07 02:25 AM

I tried as u said I got this error
---------------------
The style sheet does not contain a document element. The style sheet may be empty, or it may not be a well-formed XML document.
-----------------------
now what to do?


Post Extras: Print Post   Remind Me!   Notify Moderator  
RKY
stranger


Reged: 08/22/06
Posts: 586
Loc: Bangalore, India
Re: How to Export test results to HTML file in QTP [Re: Dipika]
      #380454 - 05/14/07 04:30 AM

attach the Pdetails.XSL file in the forum.

--------------------

Hope this helps you,


- RKY


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dipika
Member


Reged: 01/02/07
Posts: 261
Loc: Central India
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #380655 - 05/14/07 09:39 PM Attachment (181 downloads)

I am sending u the Pdetails.xsl file but unable to understand as to where the changes have to be made.Could u plz guide me with this.

Post Extras: Print Post   Remind Me!   Notify Moderator  
RKY
stranger


Reged: 08/22/06
Posts: 586
Loc: Bangalore, India
Re: How to Export test results to HTML file in QTP [Re: Dipika]
      #380682 - 05/15/07 12:09 AM


Attach PDetails.XSL file ,It shows the Html page

--------------------

Hope this helps you,


- RKY


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dipika
Member


Reged: 01/02/07
Posts: 261
Loc: Central India
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #380979 - 05/15/07 10:11 PM

I did try to attach that Pdetails.xls file But Then it said that it won't attach this file so I copied the contents and pasted it on the notepad and sent it to u
It wud be very kind if u tell me step by step how things have to be done to do that task.
Sorry for the Troubling u so much but I am very keen in doing this work


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tarun LalwaniModerator
Veteran


Reged: 07/21/05
Posts: 13526
Re: How to Export test results to HTML file in QTP [Re: Dipika]
      #381011 - 05/16/07 12:16 AM

Just to make things clear. You can't convert a Result XML from QTP in case it is for the script which is currently running. You need to either do it through a VBS file or for a script which has already finished.

--------------------
Regards,
Tarun
QTP Interview Unplugged - Experience a real Interview...


KnowledgeInbox RSS


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dipika
Member


Reged: 01/02/07
Posts: 261
Loc: Central India
Re: How to Export test results to HTML file in QTP [Re: Tarun Lalwani]
      #381091 - 05/16/07 03:56 AM

Yes , but I am unable to understand how to work out the things.

Post Extras: Print Post   Remind Me!   Notify Moderator  
miraz2007
Newbie


Reged: 05/07/07
Posts: 23
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #381187 - 05/16/07 07:10 AM Attachment (150 downloads)

Dear Jeff,

Attached PDetails.XSL file. Could you please tell me that what exactly I need to make change on it.

Thanks
Narendra


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dipika
Member


Reged: 01/02/07
Posts: 261
Loc: Central India
Re: How to Export test results to HTML file in QTP [Re: miraz2007]
      #381591 - 05/17/07 06:25 AM

Yes Jeff,

Please tell me also as to how to Proceed in this case


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dipika
Member


Reged: 01/02/07
Posts: 261
Loc: Central India
Re: How to Export test results to HTML file in QTP [Re: Tarun Lalwani]
      #382065 - 05/18/07 09:59 PM

Sorry,I don't ahve much knowledge about QTP,But He asked for the PDetails file and Not the rEsult XML File Tarun.I hope I am not very Wrong.and I didn't find any PDetails.xls file in the Result Folder.

Post Extras: Print Post   Remind Me!   Notify Moderator  
rss
Member


Reged: 04/19/07
Posts: 57
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #382173 - 05/21/07 12:27 AM Attachment (134 downloads)

Anyone getting the test results as HTML file.

I tried as per Hardy comments, updated the xmlSource.Load and xmlXForm.Load, its creating the html file as TestReport.html in "C:\" directory. After executed any script and opened that html file contains only

Report
Test:

Attached the PDetails.xsl with this post. Please open the attachment in Wordpad or Textpad, while attaching the file its not accepting the xsl file so converted as .doc and let us know where we need to modify...

Edited by rss (05/21/07 12:51 AM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dipika
Member


Reged: 01/02/07
Posts: 261
Loc: Central India
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #382488 - 05/21/07 10:27 PM

Its amazing that people do know how to srt out someone's Problem but after giving few Tips refrain themselves from Giving Complete Solutions.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Tarun LalwaniModerator
Veteran


Reged: 07/21/05
Posts: 13526
Re: How to Export test results to HTML file in QTP [Re: Dipika]
      #382492 - 05/21/07 10:38 PM

Well! Have your ever thought why does this happens to your posts only?

Here is your last one which went too long then expected
http://www.sqaforums.com/showflat.php?Cat=0&Board=UBB20&Number=365912

What i personally feel is that you dont give others a very good chance to support for long. You need to improve on your researching skills for solving the problems and then only will others be able to help. If you want an answer to your query then post what exactly you want to do and what you have understood till now and where does the problem lie. I can answer you but not till i see what have you tried to understand.

--------------------
Regards,
Tarun
QTP Interview Unplugged - Experience a real Interview...


KnowledgeInbox RSS


Post Extras: Print Post   Remind Me!   Notify Moderator  
Shipto
Junior Member


Reged: 07/24/06
Posts: 18
Loc: ZHA
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #382542 - 05/22/07 12:53 AM

Thanks Jeff.

It works.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dipika
Member


Reged: 01/02/07
Posts: 261
Loc: Central India
Re: How to Export test results to HTML file in QTP [Re: Tarun Lalwani]
      #382605 - 05/22/07 04:05 AM

I am very Sorry to say Tarun,although that particular Post went too long but Then also I didn't get a proper Reply.And at last I tried on my Own and I got It!
Now Its not the case with my posts only but thee are in deed many other post which go so long without getting Proper response.So Please Its my request that don't Point Out Like this and In this manner.Its not only me who has been waiting for the response of this query But as you go thru the Thread ,You will find many other People in the queue.Right .Please Go thru the thread.
Thanks for your Kind Concern But rather than pointing out Like this.It would have been better if U would have written last line only so I would have explained you the entire Scenario.Well May be I am not very clear ,I just read this and started Trying.I never did researching on it.
Sorry for this attempt.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Perf_Learner
Member


Reged: 03/02/07
Posts: 262
Loc: Mumbai, India
Re: How to Export test results to HTML file in QTP [Re: Dipika]
      #382616 - 05/22/07 04:25 AM

Hi Tarun,

I think this issue could better be resolved if you give a complete answer.
EVen I am facing this problem from long but refrained from posting the quey as it has been posted quite often. But none has the proper result.
So I would please request yu to post the answer to this question as to how can we save a test result into HTML file.

Regards
Ankush

--------------------
Regards,
Performance Learner


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tarun LalwaniModerator
Veteran


Reged: 07/21/05
Posts: 13526
Re: How to Export test results to HTML file in QTP [Re: Perf_Learner]
      #382784 - 05/22/07 10:06 AM Attachment (476 downloads)

Dipika, It's was not just about you. We have been trying to help everyone on the forum but the only thing that i see less is that people dont say what they have understood and what they are missing. "It's not working" is not really a good response that we expect to see...Anways lets come down to business

I will try to keep it short and simple.

QTP generate it's results in XML format. These results are only accessible when the test case has finished execution. Any manipulation that you want to do with the results you can do that only outside of QTP (in case you are looking at the results of QTP script that just ran). This can be achieved by running you script from a external VBS which use QTP AOM for running the script. And once done you can access the script in the external VBS.

Coverting results to HTML:
XSL is a Stylesheet language which can be used to transform a XML in way we want it to be. The output could be a HTML file, a text file, a XML file etc...To do this transformation at run-time we need to load the XML and then the XSL into that and save the output. QTP comes with three different XSL files which are present in the below location

C:\Program Files\Mercury Interactive\QuickTest Professional\dat
PDetails.xsl - Detalied HTML Conversion
PShort.xsl - Short HTML conversion
PSelection.xsl - Selective HTML Conversion

The last one (PSelection.xsl) requires input arguments for the XSL and the first 2 can be simply loaded into the XML.

Code:

sResultsXML = "C:\Results.xml"
sDetailedXSL = "C:\Program Files\Mercury Interactive\QuickTest Professional\dat\PDetails.xsl"
sShortXSL = "C:\Program Files\Mercury Interactive\QuickTest Professional\dat\PDetails.xsl"


ApplyXSL sResultsXML, sDetailedXSL, "C:\Results_Detailed.html"
ApplyXSL sResultsXML, sShortXSL, "C:\Results_Short.html"

Public Function ApplyXSL(ByVal inputXML, ByVal inputXSL, ByVal outputFile)
sXMLLib = "MSXML.DOMDocument"
Set xmlDoc = CreateObject(sXMLLib)
Set xslDoc = CreateObject(sXMLLib)

xmlDoc.async = False
xslDoc.async = False

xslDoc.load inputXSL
xmlDoc.load inputXML

outputText = xmlDoc.transformNode(xslDoc.documentElement)

Set FSO = CreateObject("Scripting.FileSystemObject")

Set outFile = FSO.CreateTextFile(outputFile,True)
outFile.Write outputText
outFile.Close


Set outFile = Nothing
Set FSO = Nothing
Set xmlDoc = Nothing
Set xslDoc = Nothing
Set xmlResults = Nothing
End Function



I have attached the outputs to the post. Just note one thing that in case you want the results to be displayed correctly then the PResults.css file should be present in the same folder as HTML.

--------------------
Regards,
Tarun
QTP Interview Unplugged - Experience a real Interview...


KnowledgeInbox RSS


Post Extras: Print Post   Remind Me!   Notify Moderator  
miraz2007
Newbie


Reged: 05/07/07
Posts: 23
Re: How to Export test results to HTML file in QTP [Re: Tarun Lalwani]
      #383294 - 05/23/07 01:01 PM

Thanks Tarun,

It is working fine.

Thanks
Mir

Edited by miraz2007 (05/23/07 01:03 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Dipika
Member


Reged: 01/02/07
Posts: 261
Loc: Central India
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #401396 - 07/26/07 11:22 PM

Thanks Jerry and Tarun

I have done it.


Post Extras: Print Post   Remind Me!   Notify Moderator  
SSKQA
Member


Reged: 07/27/07
Posts: 37
Re: How to Export test results to HTML file in QTP [Re: Dipika]
      #417593 - 09/19/07 01:45 PM

Hi All

I am facing the same problem, I need to export the results
to html.

What I Did

1. USed the above code (provided by Tarun) in a script and also moved the PResults.css into the same Folder where I am Destinating the Result HTML Files.
2. Executed the Script in which I had appended the html reporting Script given above.

Problem : I Could see that the Results_Detailed.html files created has only Report and Test sections without any result data, the page is blank.

Did I miss any process or Am I in the incorrect approach, Please provide some inputs on this.

Santhosh

--------------------
Santhosh


Post Extras: Print Post   Remind Me!   Notify Moderator  
TmReddy
Advanced Member


Reged: 02/01/07
Posts: 456
Loc: Pittsburgh, USA
Re: How to Export test results to HTML file in QTP [Re: SSKQA]
      #417598 - 09/19/07 01:54 PM

Are you pointing to right Results.xml file in your code?

Post Extras: Print Post   Remind Me!   Notify Moderator  
Tarun LalwaniModerator
Veteran


Reged: 07/21/05
Posts: 13526
Re: How to Export test results to HTML file in QTP [Re: SSKQA]
      #417599 - 09/19/07 01:55 PM

I think you missed a critical part

Quote:


These results are only accessible when the test case has finished execution. Any manipulation that you want to do with the results you can do that only outside of QTP (in case you are looking at the results of QTP script that just ran). This can be achieved by running you script from a external VBS which use QTP AOM for running the script. And once done you can access the script in the external VBS.





--------------------
Regards,
Tarun
QTP Interview Unplugged - Experience a real Interview...


KnowledgeInbox RSS


Post Extras: Print Post   Remind Me!   Notify Moderator  
SSKQA
Member


Reged: 07/27/07
Posts: 37
Re: How to Export test results to HTML file in QTP [Re: SSKQA]
      #417603 - 09/19/07 02:11 PM

Hi Again !

I had missed the loading of xml file earlier, but loaded the xml file from one of the script's Report folder now , which converted the existing Report into html format, But how do I Make this for a run time script, i.e I need to see the results in html for the script I execute now.

Santhosh

--------------------
Santhosh


Post Extras: Print Post   Remind Me!   Notify Moderator  
jayashreenitekar
Newbie


Reged: 08/03/07
Posts: 4
Re: How to Export test results to HTML file in QTP [Re: SSKQA]
      #418055 - 09/21/07 12:41 AM

Hi Tarun
Thank you very much for the code given by you. It was really a great help for me. I have used this code to convert XML to excel conversion. It works fine but if the XML file size exceed to 13MB or above the following error message is displayed. "There is not enough space on the disk". How to resolve this issue? Please help.

Is there any method to convert the XML to CSV file(or any kind of Spread sheets)

Thank you.
Jayashree


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tarun LalwaniModerator
Veteran


Reged: 07/21/05
Posts: 13526
Re: How to Export test results to HTML file in QTP [Re: jayashreenitekar]
      #418056 - 09/21/07 12:47 AM

Try using the latest XML parser. This one is a pretty old version i guess. So you need to change MSXML.DOMDocument to the latest version Class ID.

--------------------
Regards,
Tarun
QTP Interview Unplugged - Experience a real Interview...


KnowledgeInbox RSS


Post Extras: Print Post   Remind Me!   Notify Moderator  
jayashreenitekar
Newbie


Reged: 08/03/07
Posts: 4
Re: How to Export test results to HTML file in QTP [Re: Tarun Lalwani]
      #418090 - 09/21/07 03:12 AM

Hi Tarun,
I am using the MSXML2.DOMDocument instead of MSXML.DOMDocument. I am not sure whether i have used the correct one. But still i am getting the same errors.
I get either of the error messages if my xml file exceed more than 13mb.
1. There is not enough space on the disk
2. Insufficient system resources exist to complete the requested service.
Code is as below:

sResultsXML = "C:\Documents and Settings\L014540\Local Settings\Temp\TempResults\Report\Results.xml"
sDetailedXSL = "C:\Program Files\QuickTest Professional\dat\PDetails.xsl"
sShortXSL = "C:\Program Files\QuickTest Professional\dat\Pshort.xsl"
sSelectionXSL = "C:\Program Files\QuickTest Professional\dat\PSelection.xsl"


ApplyXSL sResultsXML, sDetailedXSL, "X:\PR\Testing\Testpack\ATPFramework\PRATPs\ResultsLog\Results_Detailed.xls"

ApplyXSL sResultsXML, sShortXSL, "X:\PR\Testing\Testpack\ATPFramework\PRATPs\ResultsLog\Results_Short.xls"

ApplyXSL sResultsXML, sSelectionXSL, "X:\PR\Testing\Testpack\ATPFramework\PRATPs\ResultsLog\Results_Selection.xls"


Public Function ApplyXSL(ByVal inputXML, ByVal inputXSL, ByVal outputFile)
sXMLLib = "MSXML2.DOMDocument"
Set xmlDoc = CreateObject(sXMLLib)
Set xslDoc = CreateObject(sXMLLib)
xmlDoc.async = False
xslDoc.async = False
xslDoc.load inputXSL
xmlDoc.load inputXML
outputText = xmlDoc.transformNode(xslDoc.documentElement)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set outFile = FSO.CreateTextFile(outputFile,True)
outFile.Write outputText
outFile.Close
Set outFile = Nothing
Set FSO = Nothing
Set xmlDoc = Nothing
Set xslDoc = Nothing
Set xmlResults = Nothing
End Function

Thank you,
Jayashree


Post Extras: Print Post   Remind Me!   Notify Moderator  
jayashreenitekar
Newbie


Reged: 08/03/07
Posts: 4
Re: How to Export test results to HTML file in QTP [Re: jayashreenitekar]
      #427312 - 10/24/07 11:34 PM

Hi Tarun,
When i am using the above code to convert xml to excel, it gives the all the Status(Done,Passed, Fail,Warnings). Is it possible to eliminate the Done status and get only the Passed and Failed status results?

Thx.
Jay


Post Extras: Print Post   Remind Me!   Notify Moderator  
Eragon
Newbie


Reged: 01/10/07
Posts: 19
Loc: UK
Re: How to Export test results to HTML file in QTP [Re: Tarun Lalwani]
      #428280 - 10/29/07 05:00 AM

Hello Tarun,

Thanks for your help........ can you let me know the input parameters what we need to pass to selection.xsl
are they the keywords described in the XSL or anything else.
I mean AIter, Tname,sname etc....
Can you please tell me how to pass these selection parameters to the XSL

Thanks in advance,


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tarun LalwaniModerator
Veteran


Reged: 07/21/05
Posts: 13526
Re: How to Export test results to HTML file in QTP [Re: Eragon]
      #430209 - 11/02/07 09:36 PM

Look at below link and you will know how to do it

http://msdn2.microsoft.com/en-us/library/ms950787.aspx

--------------------
Regards,
Tarun
QTP Interview Unplugged - Experience a real Interview...


KnowledgeInbox RSS


Post Extras: Print Post   Remind Me!   Notify Moderator  
praveen228
Junior Member


Reged: 09/30/04
Posts: 9
Loc: Pune
Re: How to Export test results to HTML file in QTP [Re: SSKQA]
      #503628 - 07/28/08 11:19 AM

hi,
i'm not sure if you've come across this:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1222546

--------------------
Praveen


Post Extras: Print Post   Remind Me!   Notify Moderator  
gyana007
Newbie


Reged: 07/28/08
Posts: 5
Re: How to Export test results to HTML file in QTP [Re: RKY]
      #504449 - 07/30/08 11:21 PM

I am not able to produce result with this code,..Pls guide me step by step process so that I can prduce report .html format.

waiting for ur valuable reply..

thanks
Gyan


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tarun LalwaniModerator
Veteran


Reged: 07/21/05
Posts: 13526
Re: How to Export test results to HTML file in QTP [Re: gyana007]
      #504463 - 07/30/08 11:53 PM

Are you running the code in your QTP script?

--------------------
Regards,
Tarun
QTP Interview Unplugged - Experience a real Interview...


KnowledgeInbox RSS


Post Extras: Print Post   Remind Me!   Notify Moderator  
Sandeep_Khairwal
Newbie


Reged: 07/29/08
Posts: 15
Re: How to Export test results to HTML file in QTP [Re: jayashreenitekar]
      #504944 - 08/01/08 03:22 AM

Hi Jay,

Have you got your queries answer.If yes pls share it with me.If no, Varun pls guide,Is it possible to eliminate the Done status and Smart Identification Alternative Description, and get only the Passed and Failed status results?

Thanks in advance.

Sandeep


Post Extras: Print Post   Remind Me!   Notify Moderator  
czar
Member


Reged: 05/25/07
Posts: 90
Re: How to Export test results to HTML file in QTP [Re: Sandeep_Khairwal]
      #505108 - 08/01/08 09:30 AM

Hi everybody,

This is very nice thread. I learned a lot. Thanks for that.I am having a similar problem. I am executing my QTP scripts from QC. Now we have a requirement to send an email automatically with the test results once the execution is done. we want the test results of each test in the test set to be emailed.

Any inputs would be appreciated.

Thanks

--------------------
- Czar


Post Extras: Print Post   Remind Me!   Notify Moderator  
gyana007
Newbie


Reged: 07/28/08
Posts: 5
Re: How to Export test results to HTML file in QTP [Re: Tarun Lalwani]
      #505444 - 08/04/08 02:50 AM

Thanks for ur reponse..Yes Tarun..I am using this in the script.

My automatiom frame work is like..we have one module in which 7 to 8 pages navigation.. so in main module i call the resuable action(steps) to execute one module.so i need the result in .html and .xls format at the end of the my execution.

Pls guide me..Thanks again.

Thnks
Gyan


Post Extras: Print Post   Remind Me!   Notify Moderator  
Sandeep_Khairwal
Newbie


Reged: 07/29/08
Posts: 15
Re: How to Export test results to HTML file in QTP [Re: Tarun Lalwani]
      #505703 - 08/04/08 10:41 PM

Hi Varun,

First thanks for sharing you knowledge.I got the results in HTML format but i got the Done status statements and Smart Identification Alternative Description also in the results,I need only Pass and Failed status in results.Pls advice how can get it.

Thanks in advance.

Sandeep


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tarun LalwaniModerator
Veteran


Reged: 07/21/05
Posts: 13526
Re: How to Export test results to HTML file in QTP [Re: Sandeep_Khairwal]
      #505705 - 08/04/08 10:42 PM

As of now not possible to set such a filter. But this would be possible soon...

--------------------
Regards,
Tarun
QTP Interview Unplugged - Experience a real Interview...


KnowledgeInbox RSS


Post Extras: Print Post   Remind Me!   Notify Moderator  
Sandeep_Khairwal
Newbie


Reged: 07/29/08
Posts: 15
Re: How to Export test results to HTML file in QTP [Re: Tarun Lalwani]
      #505728 - 08/05/08 12:01 AM

Hi Tarun,

Thanks for quick responce.Fine we will wait for your responce on this filtering.
But right now we have to provide the test results to client.
If we share these test reports, with Done status statements and Smart Identification Alternative Description statements then its very confusing to them.Is there any alternate way to provide simple test reports to client.

Thanks
Sandeep


Post Extras: Print Post   Remind Me!   Notify Moderator  
snparikh
Active Member


Reged: 02/05/08
Posts: 877
Loc: Santa Monica, CA, USA
Re: How to Export test results to HTML file in QTP [Re: Sandeep_Khairwal]
      #505729 - 08/05/08 12:09 AM

You can modify the xsl file that you use to export to display only Pass & Fail or the way you want.

--------------------
-Suchit
http://www.foxaudiencenetwork.com/


Post Extras: Print Post   Remind Me!   Notify Moderator  
gyana007
Newbie


Reged: 07/28/08
Posts: 5
Re: How to Export test results to HTML file in QTP [Re: Dipika]
      #505810 - 08/05/08 04:49 AM

Hi Dipika;
Can u tell me exact way ..how u did it?how i execute this script in QTP.
waiting for ur valuable reponse.


Tnka
Gyan


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tarun LalwaniModerator
Veteran


Reged: 07/21/05
Posts: 13526
Re: How to Export test results to HTML file in QTP [Re: gyana007]
      #505818 - 08/05/08 04:56 AM

You need to run the code outside QTP and not inside QTP. Use a external VBScript to run your test and access the result xml

--------------------
Regards,
Tarun
QTP Interview Unplugged - Experience a real Interview...


KnowledgeInbox RSS


Post Extras: Print Post   Remind Me!   Notify Moderator  
saif24
Newbie


Reged: 05/28/07
Posts: 15
Re: How to Export test results to HTML file in QTP [Re: jayashreenitekar]
      #508976 - 08/16/08 01:35 PM

HI Jayashree ,

How r u . could you please tell me why the below code does not works for me . I have used the below code as it its excepts the path in the sResultsXML and path for ByVal outputFile. I have used as a vbs file and attached the same to my script .It creates a html report but the report is empty . please help me in this issue .I have also included the .css file in the folder where this html reports are stored.

Thanks
Saif

Edited by saif24 (08/16/08 01:37 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tarun LalwaniModerator
Veteran


Reged: 07/21/05
Posts: 13526
Re: How to Export test results to HTML file in QTP [Re: saif24]
      #508979 - 08/16/08 02:33 PM

This thread should now be used for reference only.

Thread locked!

--------------------
Regards,
Tarun
QTP Interview Unplugged - Experience a real Interview...


KnowledgeInbox RSS


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1 | 2 | 3 | 4 | >> (show all)



Extra information
10 registered and 96 anonymous users are browsing this forum.

Moderator:  IanFraser, thorwath, TReddy, AJ, Tarun Lalwani, mwsrosso 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating: ***
Topic views: 10456

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5