Micro Focus QTP (UFT) Forums
How to get qtp Reporter/Summary in vb script - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to get qtp Reporter/Summary in vb script (/Thread-How-to-get-qtp-Reporter-Summary-in-vb-script)



How to get qtp Reporter/Summary in vb script - rlin2012 - 10-31-2012

Hi,

I am writing a vb script to capture the test results(pass,fail, start time, end time, etc) and to add them into an email body. Basically I want to get Reporter.RunStatus which gives pass/fail infor. and Summary which gives the start/end time. But how do I get them in vbscript?

I tried CreateObject("QuickTest.Reporter), and it doesn't work. Also Summary is not a qtp object but en element of an action. I am new to QTP and vbs, can anyone help?

Thanks!

Rong

Plus note:

I am writing an external vbscript, which opens QTP and runs a test. At the end of test, Iwant to capture the qtp test resuls into the external vbscript and then send the results via email.


RE: How to get qtp Reporter/Summary in vb script - harishshenoy - 11-20-2012

Code:
Set app = createobject("QuickTest.Application")
Result_value = app.test.lastrunresults.status


Here , 'Result_value' will give the result of the test execution , u can use this for the further purpose.

Thanks,
Harish Shenoy