Search code examples
batch-filetestingautomated-testshp-quality-center

Run batch script from Quality Center


I have a batch script (.bat file) that I run from commandline to execute my test scripts. Now I would like to invoke this batch script from HP Quality Center. How should I run a batch script from Quality Center?


Solution

  • You can create a VAPI-XP test in Quality Center and start your batch script from the Test Script of the test case using some code like this (VBScript):

    mycommand = "C:\tmp\some.bat"
    TDOutput.Print "Starting " & mycommand
    result=run(mycommand,0,true)
    TDOutput.Print "Test ended with " & result