Ad Home

Theme images by kelvinjay. Powered by Blogger.

Travel

Header Ads

Java

Selenium

UFT

Framework

General QA Concept

BDD

» » » What is Test Batch Runner in UFT/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. To run different testing scripts at different time UFT has come up with an excellent feature called - Test Batch Runner. 

For performing Batch Testing, QTP 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


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





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


















add all tests you want to run



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.







«
Next
Newer Post
»
Previous
Older Post

10 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??

    ReplyDelete
  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

    ReplyDelete
    Replies
    1. Yes, you can edit any point of time.Once saved the updated file will get executed.

      Delete
  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.

    ReplyDelete
  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 ?

    ReplyDelete
    Replies
    1. I general do not prefer the test batch runner,rather try to use a AOM model.

      Delete
    2. 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

      Delete
  5. QTP 11 script batch runner does not generate consolidated html batch run report. feature has been removed?

    ReplyDelete
    Replies
    1. Each test scriprt generates its own file...batter go for your custom report.

      Delete