Integration of jbehave with jenkins

Ignacio Giagante picture Ignacio Giagante · Aug 15, 2012 · Viewed 8.2k times · Source

I have to integrate jbehave with jenkins. But I don't have idea how to do this. I saw that I have to create a task in Jenkins, but I don't know where I should wire jbehave with this task.

Can somebody help me?

Thanks,

Sarang

Answer

jduncombe picture jduncombe · Oct 2, 2012

So I'm assuming you have JBehave integrated with Maven, correct? The simple build environment can be set up as follows:

  1. Go to Jenkins and add a new job of type "Build a maven2/3 project"
  2. Configure your project to check out your from whatever source repository you use.
  3. Configure the build phase of the project to run whatever Maven goal you need ("install" will probably work)
  4. Hit save and you have a working project that will execute exactly as it would from a command line.

If you want to see the JBehave test output rendered nicely in Jenkins you should also follow these instructions to configure the Jenkins/XUnit plugin: http://jbehave.org/reference/stable/hudson-plugin.html

You will also need to make sure your project is configured to use the XML Output format in your StoryReporterBuilder to make use of the plugin (not mentioned in the instructions above).