How do we generate reports in calabash android ? I looked in to "The cucumber recipe" book on how to generate report. But that didn't help me completely. I want to generate report on why login failed : For eg : 1) User enter valid credential and tries to Login 2) But, Login fails due to server_error/user_not_found or some exceptions . I get error xml/ statusCode from server when login fails.
How to generate report using that xml/status code in calabash ? Please help !!
In short, Calabash is a test automation framework that enables mobile developers and pretty much anyone without coding skills to create and execute automated acceptance tests for Android and iOS apps.
What is Calabash? Calabash is an open-source Acceptance Testing framework that allows you to write and execute tests for iOS and Android Apps. It's an Automated User Interface Framework that allows tests to be written in Ruby using Cucumber.
Calabash-Android Setup for WindowsDownload and install the Android SDK from https://developer.android.com/sdk/installing/index.html. Then add the tools and platform-tools directories from the SDK to your PATH environment variable. Install the Genymotion Android emulator, available from: http://www.genymotion.com.
Use this command to execute your test:
calabash-android run <apkfile>.apk --format html --out reports.html
<%
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
Here is my calabash-android profile config, you can put it in ./.config/cucumber.yml file under your calabash android project. using the following command will export the test result into a rerun.txt file and a ./reports/output_#{date}.html file at the same time:
calabash-android run *.apk -p run
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With