In this post, we will see how to configure JBehave results on the Apache HTTP server. When we run JBehave stories and try to view the default reports path, you need to browse project home > target > jbehave > view every time to view the report.
In this article, we will simplify the task to open the results page every time, like as simple as opening an URL in a browser!
Search for “Apache Server download”
On zero-click >> Downloads go to the downloads page,as shown in below picture:
Grab the latest stable version download that fits on your OS. Download the httpd installer from the mirror, unless you are gonna change and build it.
More Information at:
Open httpd.conf file from the hard disk location from where you have extracted it.
Open the config file with a text editor
Now, change the ‘DocumentRoot’ to point to JBehave results folder : for example target/jbehave/view folder, e.g.
In case you did a custom implementation of JBehave and writing reports to some other folder. Add the custom path to the Document Root. Be Careful while modifying the path.
Replace reference to the old DocumentRoot with your new DocumentRoot location
<Directory "<your_project_path>\target\jbehave\view"> ... </Directory>
Re-start the Apache Server, you should be able to access JBehave results on url : for example
http://localhost/reports.html as shown in the above picture.
Now you will get rid of digging the folders every time you run the stories to view the reports. Just book mark the URL on the browser and open it.
JBehave Tutorials on this website can be found at:
For more details on the JBehave framework, visit the official JBehave website at: