Micro Focus QTP (UFT) Forums
Is QTP able to execute n tests parallel ? - 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 Interview Questions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Interview-Questions)
+--- Thread: Is QTP able to execute n tests parallel ? (/Thread-Is-QTP-able-to-execute-n-tests-parallel)



Is QTP able to execute n tests parallel ? - dopolony - 08-26-2008

Hello,

I hope anyone can answer my question. Is Quicktest Professional able to execute 2 or mroe tests parallel ?

Greets,
Dominik Opolony


RE: Is QTP able to execute n tests parallel ? - niranjan - 09-01-2008

As far as I know, the answer is NO.


RE: Is QTP able to execute n tests parallel ? - bfakruddin - 01-28-2009

Nope,

We can run tests one after the other but can't run at a time...

thanks & regards
Baba Fakruddin.D


RE: Is QTP able to execute n tests parallel ? - sreekanth chilam - 01-28-2009

Hi ,

We cannot run multiple tests parallelly using QTP....

But we can run a batch of tests using a feature "Test batch Runner" in QTP which executes the multiple tests sequentially...( As shown below )

1) Open Test Batch Runner

2) Save the batch file(.mtb) which contains multiple tests into req. location.

3) Open required Batch file --> Run the batch file


RE: Is QTP able to execute n tests parallel ? - mrinal_nandi - 04-23-2012

Hi,
You can not run more than 1 test parallelly.
You can run the test sequentially using Batch Runner or define your custom Batch Runner Script.
1) Create a excel with test case name and markes yes or no depending your execution requirement.
2) Use QTP object model to create QTP object.
3) Read from excel take the test case name for which execution status marked as yes.
4) Define your test case path.
4) Use loop to open each test case (using test case path+ Test case name) and execute the test case using QTP Automation object.

Sample Code:
Code:
strTestScriptFolderPath="E:\Alpha Centauri\QA Automation\Test Scripts\"
Set objQTPApp=CreateObject("QuickTest.Application")
objQTPApp.Launch
objQTPApp.Visible =True
Set objInputDataFile=CreateObject("Excel.Application")
'Opening Input data Excel in Read - Write Mode
objInputDataFile.Workbooks.Open inputExcelpath,True,True
Set objCurWorksheet=objInputDataFile.ActiveWorkbook.Worksheets(1)
intRowCnt = objCurWorksheet.UsedRange.Rows.Count
For intCurRow=2 to intRowCnt
    strExeKeyword=objCurWorksheet.Cells(intCurRow,5)
    If LCase(Trim(strExeKeyword))="yes" Then    
        strTestScriptsName=objCurWorksheet.Cells(intCurRow,4)
        x=strTestScriptFolderPath&strTestScriptsName        
        objQTPApp.Open x, False, False
        Set objQTPTest= objQTPApp.Test        
                         objQTPTest.Save        
                         Set objQTPResultsOpt=CreateObject("QuickTest.RunResultsOptions")
        objQTPResultsOpt.ResultsLocation="<TempLocation>"        
        objQTPTest.Run  objQTPResultsOpt
        strResultStatus=objQTPTest.LastRunResults.Status
        If  strResultStatus="Warning" Then
            strResultStatus="Passed"
        End If
        objCurWorksheet.Cells(intCurRow,6)=strResultStatus
        'objQTPTest.Close
    End If
Next

objInputDataFile.Activeworkbook.SaveAs strExectionResultPath
objInputDataFile.Activeworkbook.Close
objInputDataFile.Quit


Regards,
Mrinal Nandi
Automation Tester