The RunScript task is a plugin task for ant. To use it, download it and place the jar file in your Ant installation lib directory. Then include a taskdef element at the top of your ant build file like so:
<taskdef name="runscript" classname="com.badboy.ant.RunScriptTask"/>
Launches Badboy and causes it to run a specified script. The script is launched in silent mode so that it will not be stalled by unexpected popups or dialogs. When the script is finished running the results are saved in a report called "badboy.ant.html" in the local directory.
If the script fails (has errors or assertion failures) by default it will fail the build with an error. This behavior can be disabled by setting the failOnError property to false.
After a script is finished the summary values for the top level script item are set as properties in the ant project. Thus you can access them in later ant tasks using the form "${badboy.script.assertions}", etc.
Note: see the RunTestPlan task if you want to run a script using Wave Test Manager instead of using Badboy directly.
| Attribute | Description | Required |
| script | The name of the script to run. | Yes |
| report | The name of the file to save the HTML report output to. | No; Defaults to "badboy.ant.html". |
| failOnError | true or false - controls whether errors or assertion failures in the script are treated as a build failure. | No; Defaults to true. |
| resultsproperty | The name of the property under which script summary results are stored. | No; defaults to "badboy.script". |
Variables may be set as input to the script by nesting <var> elements within the <runscript> tag. Each <var< has a name attribute specifying the name of the variable to set and the contents of the element specify the value of variable.
The following example runs a script called "test.bb" and saves the results to a report file called "report.html". Three variables are passed to the script.
<runscript script="test.bb" report="myreport.html">