Micro Focus QTP (UFT) Forums
need information regarding test batch runner - 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: need information regarding test batch runner (/Thread-need-information-regarding-test-batch-runner)



need information regarding test batch runner - galstar - 09-02-2010

Hi all,

I have a question related to QTP Batch script execution. I have 20 test scripts each containing multiple reusable actions. I want QTP to execute them in a batch. Now i have two options to go with
1) Develop a QTP driver script which calls all the actions in these 20 test scripts in required flow.
2) Create Batch using Test Batch runner tool by selecting all the test scripts need to be executed.

Now the benefit of executing test script in batch test runner is it sets it in batch mode and no error prompts can cause stop executing script?
But problem I am facing is every time I execute multiple test scripts using test batch runner I could only see test results of last executed test script i.e. 20th test script.

Please suggest me any way where I can execute test scripts in batch and get a consolidated test result report at the end. Because I want to run this batch over the night, So I can’t afford to loose test results in this case.


Please help me out to resolve it

Thanks,


RE: need information regarding test batch runner - venkatbatchu - 09-03-2010

Hi Galstar,

I can give you a one user defined function so that wherever you write Reporter.ReportEvent just add one more function which i have mentioned here so that you can see all the test results in excel.

Find the below function.

Code:
Function ReportResultToExcel(Testcase, Functionality,Description,Result)
    Set objExcel=CreateObject ("Excel.Application")
    Set objWorkBook=objExcel.Workbooks.Open("D:\xxxxxAUTOMATION\Test Result\TestResults.xls")
    Set objWorkSheet=objExcel.Worksheets("Sheet1")
    objExcel.DisplayAlerts=False
    rc=objWorkSheet.UsedRange.Rows.count
    rc=rc+1
    objWorkSheet.Cells(rc,1).value=Testcase
    objWorkSheet.Cells(rc,2).value=Functionality
    objWorkSheet.Cells(rc,3).value=Description
    objWorkSheet.Cells(rc,4).value=Result
    objWorkBook.Save
    objWorkBook.Close
    Set objWorkBook=Nothing
    Set objWorkSheet=Nothing
    Set objExcel=Nothing
End Function

Please let me know for further clarification.


Regards,
Venkat.Batchu.