Search This Blog

Tuesday, June 23, 2009

XStudio 1.0: Generic executable launcher

I've just implemented a small launcher that will allow to run executable files (tests).

It takes 3 parameters as a configuration:
  • the test root path. This must indicate where are located all the executable files.
    This is a root path. Each test in XStudio has a "canonical path" that will be appended to
    this path. This path MUST not include a ending slash.
  • if the executable must be launched synchronously (if the tests returns when they are terminated) or asynchronously (when the test returns immediately but keep on running in background). If the synchronous option is checked, then the launcher will run the executable synchronously (waiting infinitely for the executable to return). If the Synchronous option is not checked, then the launcher will run the executable in background and will regularly check the presence of a file "test_completed.txt". A configurable timeout is granted to the executable to complete. If the executable did not create the "test_completed.txt" file within this timeout, then the launcher considers the test has crashed and skip it.
  • the timeout value in case the tests are asynchronous. This is the maximum time the system will wait for the test to complete.
As usual, the launchers (exe.jar) comes with its configuration file (exe.xml) file. It allows to pre-configure the launcher with some default values. Of course, the user can always overwrite them at run time of the campaign session in XStudio through the GUI..

Requirements:
  • Each test in XStudio must have his dedicated .exe file. The name of the executable MUST be equal to the name of the test.
  • The .exe file MAY be able to parse some arguments passed during interpretation. In particular testcaseIndex (optional). This allows to execute different routines depending on the testcase index.
The test is executed by the launcher using this syntax:
<testRootPath>/<testPath>/<testName>.exe /debug /testcaseIndex=<testcaseIndex>

As usual, the source code, the SDK and the script to build this launcher will be provided. This feature will be made public end of June in the version 1.0 pre-alpha here: http://www.xqual.com/support/download.html

No comments:

Post a Comment