bazarnyi / cucumber-report-db

Stores results of BDD tests with Cucumber-JVM in a database and provides reporting capabilities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cucumber Report DB

Build Status

Stores results of BDD tests with Cucumber-JVM in a database and provides reporting capabilities. It can display graphs of different test runs as well as compute statistics of most failed steps or highest runtime grouped by steps

The project includes the submodule 'silk-bdd-result-plugin' which is a plugin for fetching the test results from the database into a Silk Central test management system.

Want to learn more? See the wiki. or take a look at a demo with sample data

Setup

The Cucumber-Report-DB has two main components. The cucumber-report-web and the cucumber-formatter. In order to store and display the results of cucumber tests the web application has to be set up correctly and the formatter has to be included in the cucumber test run.

Web application (cucumber-report-web)

Requirements:

Setup (latest release version):

  • Start the MongoDB mongod --dbpath /path/to/db
  • Download the *-bootable.war from the latest release
  • execute java -jar cucumber-report-web*-bootable.war

Setup (from source):

  • Install Maven 3
  • Clone the Repo
  • Start the MongoDB mongod --dbpath /path/to/db
  • execute mvn clean install
  • execute java -jar cucumber-report-web/target/cucumber-report-web*-bootable.war

Per default the web application connects to a mongodb hosted on mongodb://localhost:27017/ without authentication (the mongodb default)

By setting the following system properties the connection to the mongodb can be configured

  • cucumber.report.db.mongo.uri (uri to mongodb e.g. mongodb://user:passwd@xxx.mongolab.com:55980/cucumberreportdb)
  • cucumber.report.db.mongo.username
  • cucumber.report.db.mongo.password
  • cucumber.report.db.mongo.database

Security (Http basic auth): By setting the system property cucumber.report.db.secured a http basic auth for the web application can be activated. You have to specify the location of a property file by setting the system property cucumber.report.db.config. The config file must have the format [cucumber-report-web.properties)[cucumber-report-web\src\main\resources\cucumber-report-web.properties]

Formatter (MongoDbFormatter)

In order to publish the results of cucumber test runs to the web application, include the at.porscheinformatik.cucumber.formatter.MongoDbFormatter in your cucumber-run (see at.porscheinformatik.cucumber.formatter.MongoFormatIT for an example)

Per default the formatter expects the web application to be hosted on http://localhost:8081 and the name of the subject under test is "product_version" By setting the following system property the location of the webapp can be defined

  • cucumber.report.server.baseUrl

By setting the following system properties the name and version of the subject under test can be specified

  • cucumber.report.product.name
  • cucumber.report.product.version

When the webapp has enabled basic auth the user and password for the formatter have to be specified via the following system properties

  • cucumber.report.server.username
  • cucumber.report.server.password

License

This software is licensed under the Apache Software License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0.txt

About

Stores results of BDD tests with Cucumber-JVM in a database and provides reporting capabilities


Languages

Language:Java 40.4%Language:JavaScript 22.8%Language:TypeScript 16.7%Language:HTML 16.2%Language:CSS 2.6%Language:Gherkin 1.3%Language:Shell 0.0%