Andy
Andy

Reputation: 233

How to generate allure report with calabash?

I'm using calabash for automate mobile app. Is it possible to integrate allure report in calabash framework?

Upvotes: 0

Views: 450

Answers (2)

Piyal George
Piyal George

Reputation: 313

To create report for calabash test:

Install allure for cucumber:

  • gem install allure-cucumber

Then add following into features/support/env.rb file

require 'allure-cucumber'
AllureCucumber.configure do |c|
   c.output_dir = "reports"
end

Above i have given "reports" as folder name, so the report of test will reside here.

Now run the calabash test:

  • calabash-android run 'your.apk' --format AllureCucumber::Formatter

This much will create an XML file as result in "reports" folder.

You can do more customization on test go through here

Upvotes: 1

Nick Stalter
Nick Stalter

Reputation: 88

I currently use Allure for my reporting.

Their Readme has the step by step process.

TL;DR

  • Add gem 'allure-cucumber' to your gemfile

  • Bundle install

  • Add require 'allure-cucumber' to your env file

  • Add AllureCucumber.configure do |config| config.output_dir = 'allure' end to your env.rb file -

note: you can change the location of your reports. I use a folder called allure

  • Then add --format AllureCucumber::Formatter to your cucumber profile or runner options

note: depending on what formatters you are using you may have to throw in a fake --out location for allure. To resolve this I just do --format AllureCucumber::Formatter --out temp.html

After this you can generate the report using their command line tool

Hope this helps

Upvotes: 1

Related Questions