What is Test Batch Runner in UFT/QTP?

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 test cases need to run during a different phase of testing. QTP is taken over by HP and renamed as UFT hence this post will also talk about test batch runner tool how 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 talks 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 the required batches.
3) Now grant permission to  ‘Test batch Runner’ to run tests
4). We can Run or Execute Test Batches from Test Batch Runner tool.
5) View Test wise Result in ‘Test Result Viewer

Forming a Test Batch: 

Launch Test Batch Runner.
Navigation: Start->program->Unified test 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.

See also  VBScript Operators

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 any numbers 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 a 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 the base state of the 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 the 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. The batch run can be executed via command prompt.

See also  Learn How to Work with XML with UFT in Fast and Effortless Manner


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


Share and Enjoy !

28 thoughts on “What is Test Batch Runner in UFT/QTP?

  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 ?


  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
    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"
    Set qtTest = Nothing
    Set qtApp = Nothing

  6. I every time used to study paragraph in news papers but now
    as I am a user of net so from now I am using net for articles
    or reviews, thanks to web.

  7. Howdy! This article could not be written any better!
    Reading through this post reminds me of my previous roommate!
    He always kept talking about this. I will send this article to him.
    Pretty sure he’ll have a great read. Many thanks for sharing!

  8. Excellent post. I used to be checking continuously this blog and I’m impressed!
    Extremely useful info specifically the closing phase
    🙂 I deal with such info a lot. I used to be looking
    for this certain information for a long time.

    Thank you and good luck.

  9. Pingback: Google
  10. Pingback: Google
  11. Pingback: Google
  12. Pingback: Google
  13. Pingback: Google
  14. Pingback: Google
  15. Pingback: Google
  16. Pingback: Google
  17. I just couldn’t depart your site before suggesting that I extremely enjoyed the usual
    info an individual supply to your guests? Is gonna be back ceaselessly to investigate cross-check new

  18. Pingback: Google
  19. Pingback: Google
  20. Ahaa, its fastidious dialogue regarding this paragraph here at this weblog, I have read allthat, so now me also commenting here.

  21. Pingback: Google
  22. I believe everything composed was very logical. But, what about this?
    suppose you wrote a catchier title? I am not suggesting your content is not good, however suppose you added
    a title that makes people want more? I mean What is Test Batch Runner in UFT/QTP?
    – TechTravelHub is kinda vanilla. You could look at Yahoo’s
    front page and watch how they create news headlines to grab viewers to click.
    You might add a video or a related pic or two to get readers excited about
    what you’ve got to say. Just my opinion, it would make your blog a little bit more interesting.

Leave a Reply

Your email address will not be published. Required fields are marked *