4

JsUnit provides an ant-script with the target 'standalone_test'. This target uses the property url to identify the HTML-site, that executes the tests. These site is checked in, so that everyone should be able after a checkout to execute this tests. This works, but the url-proprty must be set to an absolute path, like file:///home/user/projects/my-project/path/in/project/jsunit/testRunner.html. That avoids an automatic start, everyone have too specify a command with the path constructed on his box. Is it possible to pass a relative path/url instead, so that the execution of these tests can be automated? This would be helpful to setup these test in our continuous-integration-system.

Rob W
  • 341,306
  • 83
  • 791
  • 678
Mnementh
  • 50,487
  • 48
  • 148
  • 202

1 Answers1

3

You could construct the url property value using the built-in Ant basedir property.

For example, if your build script is located in and run from your /home/user/projects/my-projects directory you could set your url property as:

<property
    id="url"
    name="url"
    value="file://${basedir}/path/in/project/jsunit/testRunner.html"/>
Simon Lieschke
  • 13,058
  • 6
  • 46
  • 60