What is Test Batch Runner in UFT/QTP?

11
41
Spread the love
  • 2
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    2
    Shares

Test Batch Runner
Test Batch Runner in UFT/QTP

Test Batch Runner in UFT/QTP?

how to use test batch runner in QTP:

Executing a group of tests/series of tests at a time is known as Batch Testing or Batch Execution. During regression many of our testcases need to run during different phase of testing. QTP is taken over by HP and renamed as UFT hence this post will also talk about test batch runner toolhow to use test batch runner in uft?To run different testing scripts at different time UFT has come up with an excellent feature called – Test Batch Runner.
This article also talk about

For performing Batch Testing, QTP/UFT has provided a separate Tool called ‘Test Batch Runner’.

Steps for Batch Testing:

1). Create Individual Tests and Run once.
2). Open ‘Test batch Runner’ Tool and Form Batches.
3) Provide permission to  ‘Test batch Runner’ to run tests
4). Run or Execute Test Batches from Test Batch Runner.
5) View Test wise Result in ‘Test Result Viewer

Forming a Test Batch: 

Launch Test Batch Runner.
Navigation: Start>program>quicktest professional>Tools>Test Batch Runner>File>new>batch>add>browse path of the test (like this add number of tests)>save with MTB extension (Module test batche)>close test batch runner.

Running or Executing a Test Batch

Open Test Batch Runner Tool
Navigation: File>open>browse path of the test batch>batch>run
Note: Test Batch Runner launches QTP Tool, QTP runs Tests one by one.
Note: Allowing other products to Run Tests.
Navigation: Tools>Options>Run>check allow other mercury products>apply & Ok

Executing partial Test Batch

Open Test Batch Runner >open Test Batch>Select or deselect tests>run test batch

We can save many number of combinations to save different test suite. Like-Smoke,Unit test,regression test and can run any number of times.

This is an important tool for sequential execution of scripts created in QTP.To find out more bugs we start running the scripts in a Test Batch manner. If the recovery scenarios have been written correctly then this can be said of 100% automatic scripts execution can be done through Test Batch Runner.The test batch is also known as test suit or test set. Every test batch consists of a set of multiple dependent tests. In every test batch end stage of one test is base state of next test.
Step:1—>Go to Start–>QTP–>Tools–>Test Batch Runner

Test Batch Runner

 

Step-2–>Click Test Batch Runner to open it.The “Test Batch Runner” looks like the following window.
Test Batch Runner

 

Step:3—>Click on the add button to add the scripts that will run on sequence.

 

Test Batch Runner

add all tests you want to run

Test Batch Runner

Now click on run….yes you are done.Go back and relax.QTP will do everything for you.

few important points to remember:

1. The file extension of a test batch file is .mtb(Module test batch)
2. We can work with the test batch when UFT/QTP is closed.
3. Batch run can be executed via command prompt.

Disadvantages:

1. Addition and deletion is purely manual.
2. Results can not be seen together. Each test output has to be seen to calculate the result.
3. Result can be unknown,Passed,Failed, error or running.
It can run maximum of 150-175 testcases smoothly. Greater than that QTP may freeze or hang or may slow down the execution.

Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 2
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    2
    Shares

11 COMMENTS

  1. This looks fine. But can you tell me whether we can save this batch run file? or do we have to create a new one each time I have to execute the tests??

  2. yeah Good post but I guess you can save the file and also edit it for future executions…
    I have a dout do you know an opensource like QTP which has the same functionality …. could you suggest me ?

    greetings

  3. How this utility will ensure that all prerequisite tests are passed. I mean how this utility will help us to check whether to exceute next scripts depending upon prerequisite scripts result.

  4. Hi,

    I am using Test batch runner tool to execute many script at a time, but i m facing issue for the script which are running for more than 4 min. The script runs and QTP crashes there after.

    Can you please suggest me to overcome this ?

  5. Use some thing like this:

    Dim qtApp
    Dim qtTest
    'Create the QTP Application object
    Set qtApp = CreateObject("QuickTest.Application")
    'If QTP is not open then open it
    If qtApp.launched <> True then
    qtApp.Launch
    End If
    'Make the QuickTest application visible
    qtApp.Visible = True
    qtApp.Options.Run.ImageCaptureForTestResults = "OnError"
    qtApp.Options.Run.RunMode = "Fast"
    qtApp.Options.Run.ViewResults = False
    qtApp.Open "path of your testscript", True
    'set run settings for the test
    Set qtTest = qtApp.Test
    //you can change this option
    qtTest.Settings.Run.OnError = "NextStep"
    qtTest.Run
    qtTest.Close
    qtApp.quit
    Set qtTest = Nothing
    Set qtApp = Nothing

LEAVE A REPLY

Please enter your comment!
Please enter your name here