![]() |
Parameterization of test through Command prompt - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Parameterization of test through Command prompt (/Thread-Parameterization-of-test-through-Command-prompt) |
Parameterization of test through Command prompt - Charanpreet - 05-03-2011 I have the .vbs file which launches my test and execute it successfully. But in that test name is hard coded ie I can run only specific test. Syntax for the same is as follows:- qtApp.Open "c:\Test", True ' Open the test in read-only mode Now I want pass Test through command line ie c:\LaunchQTPApp.vbs with Test as parameter. How can I achieve this feature. Thanks in Advance. RE: Parameterization of test through Command prompt - Skepsis - 06-14-2011 There are a number of ways. Could set an Environment variable in DOS and read it in VBS, Read in a file with the correct value for which test to run. Pass a parameter into vbs using command line parameter. Open a dialog in Vbs and type in the name of the command to run. All well documented on the web. RE: Parameterization of test through Command prompt - AutomationEngr - 06-19-2011 A neat solution would be -list the tests in an excel sheet, put an execution flag and read the data from your vbs file |