/js-allure-service

Sample project using Allure Report with Jest and Cucumber, and integrating with Allure Report Service

Primary LanguageJavaScript

Allure Service

This project contains an example of how to implement the Allure Service to store the results obtained during the test run.

Service details

For this example, the tool called Allure Service was chosen (GitHub|DockerHub). Thanks Maxim Kochetkov (GitHub).

To start the docker service, run the command below:

docker run -p 8080:8080 kochetkovma/allure-server:latest -e allure.reports.history.level=10 -e allure.issues.tracker.pattern=http://my-bugtracker.com/issue/%s
-e allure.tests.management.pattern=http://my-testmanagement.com/testcase/%s

Now, just access the http:127.0.0.1:8080/ui to see the Allure Service UI.

Integration

Before you begin, define the environment variables:

  • APPLICATION: Application name
  • NODE_ENV: Execution environment
  • PROJECT_URL: Repository url
  • BUILD: Build version
  • BUILD_URL: Build url (e.g.: jenkins)
  • ALLURE_SERVICE: Allure Service url

The project contains two examples:

  • Jest
npm run test:jest
  • Cucumber
npm run test:cucumber

Execute one of the options listed above, and after this, run the command below:

npm run integration

The result obtained is look

Results submitted successfully
Report generated successfully: {
  uuid: 'bc28686e-6fb8-4e3c-a356-c2a152e9aeb8',
  path: 'dev/cucumber',
  url: 'http://localhost:8080/reports/dev/cucumber'
}