Executing a Test from an Excel Event

Some users may want to execute Test Studio tests or test lists by triggering events in an Excel spreadsheet. For example, your goal may be to create an Excel spreadsheet with a button whose click event is attached to a macro that runs your Test Studio tests.

This is possible if you write an Excel macro to run the ArtOfTestRunner.exe command from the command line, along with any necessary arguments.

You will need to add a button control from the Developer Menu in Excel and associate it with a new macro.

Excel button

In order to execute such a macro properly, Excel must be run as administrator. The Macro should use the Shell() function to execute ArtOfTest.Runner.exe with the appropriate arguments. For example: Call Shell("ArtOfTest.Runner.exe test=""C:\Users\landry\Documents\Test Studio Projects\TestProject119\WebTest.tstest""" & dosCmd, vbNormalFocus)

Note the use of double quotes around the test location argument to ArtOfTest.Runner.exe.

Call Shell

In this article
Not finding the help you need? Improve this article