Overview
jBehave supports plugins for the following:
Apache Ant
First up, you need to define the jbehave task:
<taskdef name="jbehave" classname="org.jbehave.ant.JBehaveTask" classpath="jbehave-VERSION.jar" />
Then you simply use it like you would any other task:
<target name=”run-behaviours” depends=”compile” description=”Run behaviours”> <jbehave behavioursClassName=”com.example.AllBehaviours”> <classpath … /> </jbehave>
</target>
The <jbehave> task also supports a classpath attribute.
IntelliJ IDEA
JBehave has an IDEA plug-in that allows developers to run behaviour classes. It can be downloaded through IDEA’s plugin download site.
You can also checkout the source code yourself to get the latest version. Make sure that the supported IntelliJ build matches the one that you are using. To change the build number, open the file
Eclipse
JBehave plugin for Eclipse allows you to run behaviours through a short-cut or a predefined run configuration.
You can install the plugin directly into Eclipse 3.2 by adding http://jbehave.org/eclipse-3.2 as a “Remote Site” in your Eclipse Software Update configuration. (An update site for Eclipse Europa will soon be available at http://jbehave.org/eclipse-3.3).
After a successful installation, you will be able to run behaviour class from the right-click menu or pressing Alt-Shift-x, b.
