Unified Functional Testing (formerly QTP) News and Support Forum
Showing results for 
Search instead for 
Do you mean 

How to Export QTP Result as a HTML page

Occasional Visitor

How to Export QTP Result as a HTML page

Following function is not working. Pls help me.

 

 

##################Function

 

Public Function createHTML(XMLFile,XSLFile, HTMLFile)
   sXMLLib = "MSXML.DOMDocument"
   Set xmlDoc = CreateObject("MSXML.DOMDocument" )
   Set xslDoc = CreateObject("MSXML.DOMDocument" )
   xmlDoc.async = False
   xslDoc.async = False
   xslDoc.load XSLFile
   xmlDoc.load XMLFile
   outputText = xmlDoc.transformNode(xslDoc.documentElement)
   Set FSO = CreateObject("Scripting.FileSystemObject")
   Set outFile = FSO.CreateTextFile(HTMLFile,True)
   outFile.Write outputText
   outFile.Close
   Set outFile = Nothing
   Set FSO = Nothing
   Set xmlDoc = Nothing
   Set xslDoc = Nothing
   Set xmlResults = Nothing
End Function

 

############## CAll

 

Dim XMLFile, XSLFile
 
   XMLFile  = "C:\QTP\Res1\Report\Results" & Environment.value("ResultDir") & ".xml"    
   XSLFile = "C:\Program Files\HP\QuickTest Professional\dat\PDetails.xsl"
   createHTML  XMLFile,XSLFile,"C:\Test\RResult" & Environment.value("TestName") & ".html"

6 REPLIES
Advisor

Re: How to Export QTP Result as a HTML page

Hello,

 

After check the infromation provided, we could see that this looks more a code custumisation than a QTP software issue.

 

Please keep in consideration tha our  Support Team provide support when our customers have any issue with the application (break fix problems), however  Customizations, trainings matters need to be handled by our Professional Service team (PSO).

 

Actually we have an issue with a similar description: Case 4642685114 please give us a chance to check the behavior of this case and once this case was resolved we proceed to post the resolution.

 

 

Rosvin Piedra
HP | Unified Functional Testing Engineer


If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Frequent Advisor

Re: How to Export QTP Result as a HTML page

Hi,

 

Consider that the HP Support cannot consider this as a issue, due the fact that we do not develop or modify custom code. However I see an inconsistency in your code.

 

I see that the line   Set outFile = FSO.CreateTextFile(HTMLFile,True) might be failing due the fact that the HTMLFile argument seems to be undefined when the args are declared.

 

In the other hand, will be good if you can let us know what were the exacts problems or errors that you got to affirm that the code is not working. I see that you may take the code from a forum, and might be with errors that you would be able to point: http://www.learnqtp.com/forums/Thread-How-to-export-the-QTP-Test-results-in-to-HTML-file-using-scrip... 

 

Consider the mentioned facts  you probably will recieve the response that there is no special support for developing and correct code.

 

Best,

JG

[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

Advisor

Re: How to Export QTP Result as a HTML page

Hi,

 

The actual resolution of the case mentioned is the following:

 

Actually, QTP doesn’t have a building method to save the run result in (.html). Because we need to take in consideration that QTP and the RRV are different tools, QTP only call the RRV at the moment to the test ends and the RRV is in charge to generate the reports, the calling RRV is the only action that QTP performs with RRV.

 

For this reason the function that you are requested in QTP ( Create a function that allow to QTP administrate the format and path where the results are saved at the end of each the test) is consider as a code customization.

 

At this point we are analyzing the possibility to summit an ER to the HP Labs (R&D Team) to consider the possibility to bring this customization on a future versions of QTP.

 

Thanks,

Rosvin Piedra
HP | Unified Functional Testing Engineer


If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Advisor

Re: How to Export QTP Result as a HTML page

[ Edited ]

Hi,

 

Looks like we already have this capability in the next version UFT 11.50, but the HP Labs didn't bring more deatail about this, we recoment wait to the next version of UFT and check if this could help with the requirements that you request.

 

Thanks,

Rosvin Piedra
HP | Unified Functional Testing Engineer


If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Highlighted
Occasional Contributor

Re: How to Export QTP Result as a HTML page

Hi,

 

I found this feature to be very useful, but it seem to work only when test execution is triggered manually in UFT. I start tests in Jenkins (with the appropriate plugin) remotely and I do never see any exported HTML report/results. When starting the tests from within UFT there are indeed exported files ...

 

Any ideas why this happens?

Occasional Visitor

Re: How to Export QTP Result as a HTML page

Whe I execute above function, I am getting error A Refreence to valriable or Parameter 'IDS_BC' cannot be resolved. The Variable or parameter may not be defned. or it may not be in scope PFA screenshot Kindly Advise