To get started with using the Badboy Ant plugin you first need to download the jar file
containing the plugin tasks and place them in your Ant “lib” directory. For example, if you have Ant installed at “C:\programs\apache-ant-1.8.2”, then place the jar file in “C:\programs\apache-ant-1.8.2\lib”. There are other ways to do it but this is the simplest and most tried and true method.
Once you have the jar file installed you have to do just one more thing to your build file before you can use the Badboy Ant tasks – just add two taskdefs at the top of your build file (right after the project tag) like so:
<taskdef name="runscript" classname="com.badboy.ant.RunScriptTask"/>
<taskdef name="runTestPlan" classname="com.badboy.ant.WTMTask"/>
Once you’ve done this you’re ready to use the tags just like any other inside your build file.
Using the RunScript Tag
Once you’ve declared the tasks putting the tags to use is easy. Running a simple script using Badboy on the same computer as the build script is running is, in fact, just a single tag:
If you prefer different behavior you can stop the build from failing when a script fails by simply adding a failOnError attribute and setting it to false:
<runscript script="test.bb" failOnError="false"/>
If you want to pass variables to your script then you can easily add them as child elements: