Can Customized Microsoft Excel Report by QTP 9.2?
I need to generate a Customized Excel Sheet Report for our Testing Team?
The Report should be like Name:Pre-Migration Testing
Dated:mm/dd/yyyy, Server:Oracle 10g and
detailed Test Cases Report: Success, Failure and Warnings.
Re: Can Customized Microsoft Excel Report by QTP 9.2?
It can be done maybe if you do a search you find a solution created by one of the regular contributers to this section.
Heres a hint you may even want to google it.
Re: Can Customized Microsoft Excel Report by QTP 9
I did the same thing.. Wish I could dump the code up here but you know how companies like to own the software you write. Anyway, here are the links I used to generate much of the stuff...
P.S. One lesson I learned (and this is a good) is that when you generate your own reports, you might run into the problem of when not completing a test. The problems include leaving excel running, or not putting all data in your report. A solution to this would be to create a VBS Object library for these functions. That way, you have the ability to use constructors/destructors. What I did on later programs I wrote was to close down excel spreadsheets cleanly inside the destructor. You should be able to accomplish lets say cleanly exporting your test results to a spreadsheet inside that code.. I use O'Reilly
small VBS-OO example to demonstrate destructor... Just copy this code into a new QTP project...
Public aVariable ' Variable associated with the object
Private Sub Class_Initialize()
msgbox "This automatically appears any time you create the object, " & _
"good place to create other objects used by the program"
Private Sub Class_Terminate()
msgbox "This automatically appears at the time the object is destroyed," & _
" and will automatically be called when the script ends."
Public sub PING
msgbox "Just a method in the object"
'Instantiation of the cExampleObject class
Set aObject = new cExampleObject
aObject.aVariable = "Example"
'The next line can be commented out to demonstrate QTP automatically calling object destructors at the end of a script.
Set aObject = nothing