Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8995809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:40:08+00:00 2026-06-15T23:40:08+00:00

There are a few situations where I need to launch and run a QTP

  • 0

There are a few situations where I need to launch and run a QTP test from the command prompt. For example, I’d like to use Windows Task Scheduler to run QTP tests at various times throughout the night, but there is (seemingly) no flag that I can use have QTP.exe open and run a test. How can I accomplish this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:40:09+00:00Added an answer on June 15, 2026 at 11:40 pm

    It’s true that with QuickTest Pro, you cannot directly run a test by calling C:\Program Files (x86)\HP\QuickTest Professional\bin\QTPro.exe "C:\Some Test\"
    All hope is not lost, however. There is a way to create a small VBS file that can run any arbitrary QTP test when that VBS file is called. This is much better than creating a single batch file for each and every test.

    '*******************************************************************
    'RunThisTest
    'by Michael Innes
    'November 2012
    
    testResourcePath = "C:\Test Logs and Results\"
    
    'Getting the test path
    Dim objArgs
    Set objArgs = wscript.Arguments
    testPath = objArgs(0)
    
    'Determining that the test does exist
    Dim objFSO
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    DoesFolderExist = objFSO.FolderExists(testPath)
    Set objFSO = Nothing
    
    If DoesFolderExist Then
        Dim qtApp 'Declare the Application object variable
        Dim qtTest 'Declare a Test object variable
        Set qtApp = CreateObject("QuickTest.Application") 'Create the Application object
        qtApp.Launch 'Start QuickTest
        qtApp.Visible = True 'Make the QuickTest application visible
        qtApp.Open testPath, False 'Open the test in read-only mode
        Set qtTest = qtApp.Test
    
        'Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object
        'qtResultsOpt.ResultsLocation = testResourcePath ' Specify the location to save the test results.
        'qtTest.Run qtResultsOpt,True 'Run the test and wait until end of the test run
    
        qtTest.Run 'Run the test
        qtTest.Close 'Close the test
        qtApp.Quit
    Else
        'Couldn't find the test folder. That's bad. Guess we'll have to report on how we couldn't find the test.
        'Insert reporting mechanism here.
    End If
    

    To use the code above, execute a command like this: cscript.exe "C:\RunThisTest.vbs" "L:\Test Path\The Test Itself\"

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On the past few projects of mine I've run into situations where I need
It looks like there a few working solutions for using custom true type fonts
I know how to use locks in my app, but there still few things
There are a few windows service projects in our codebase that follow this model,
There are a few factory methods in Google Guava to create InputSuppliers, e.g. from
There are a few similar questions, but nothing like this. How do you deal
I have a few situations where I need to list files recursively, but my
I am developing a web application where there are few roles like Admin,Reporter,Manager,Customer.Agent.Based on
in my page there are few hidden field which are filled with the correct
I have a webpage where there are few text fields to be filled up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.