How to create a report in Calabash-android

How do we create reports in calabash android? I looked into the book "Cucumber Recipe" on how to create a report. But that did not help me completely. I want to create a report on why the login failed: For example: 1) The user enters valid credentials and tries to log in 2) But, Login failed due to server_error / user_not_found or some exceptions. I get an xml / statusCode error message from the server when login fails.

How to generate a report using this xml / status code in calabash? Please, help!

+5
source share
4 answers

Use this command to run the test:

calabash-android run <apkfile>.apk --format html --out reports.html
+18
source
<%
date = Time.now.strftime('%m_%d-%H:%M:%S')
default_report = "./reports/output_#{date}.html"
default_rerun = "./rerun.txt"
%>

common: NO_STOP='1'
rerun_out: -f rerun -o <%= default_rerun %>
html_report:  -f html -o <%= default_report %>

run:  -p common -p rerun_out -p html_report

calabash-android, . /.config/cucumber.yml calabash android. , rerun.txt . /reports/output _#{date}.html :

calabash-android run *.apk -p run
+1

For HTML report

> calabash-android run <apkfile>.apk --format HTML --out

For JSON Report

> calabash-android run <apkfile>.apk --format JSON --out

These are otehr formats in cucumber,

  • Pretty
  • Progress
  • Using
  • Junit
  • Restart

Read more here: https://cucumber.io/docs/reference#reports

0
source

For an HTML report, use the following:

calabash-android run $ {APKFile} -f html -o test-result.html

0
source

All Articles