-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Cucumber reports for cucumber-android #605
Fix Cucumber reports for cucumber-android #605
Conversation
@SierraGolf or @mfellner can you decide what to do with this PR please? You're more cosy with the Android code than me. |
@friederbluemle can you rebase please? a couple of your changes already came in with #598. I think after the rebase this PR will only contain the removal of the clear() call which is fine with me. @mfellner any objections? |
No objections. Maybe you should add a note regarding the cucumber-html.jar dependency to examples/cukeulator-test/libs/README.md. This is the only place right now for information about required jars when not building with Maven. |
Rebased onto origin/master. Indeed the clear() call was the only remaining line. |
This enables standard Cucumber reports using the 'format' parameter of CucumberOptions. Reports will be stored on the device.
Fix Cucumber reports for cucumber-android
@SierraGolf Don't forget to update the History.md when merging a PR (or closing an issue). From https://groups.google.com/forum/#!topic/cukes-devs/0dhf7-RgcZc
(or do what I have sometimes done, merge locally and amend the merge commit with the History.md change before pushing to GitHub) |
@brasmusson thanks for the info. |
Hello, I am trying to get Cucumber reports, but I get a message with permission denied. In my Manifest file I have: and in my class I have: } When I try to run the tests I get: |
@rusuo Github is not a support forum, use the mailing list: https://groups.google.com/forum/#!forum/cukes |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This PR enables standard Cucumber reports using the
format
parameter ofCucumberOptions
byReports will be stored on the device.
Example:
@CucumberOptions(features = "features", format = {"pretty", "html:/data/data/com.mypackage/cucumber-html", "json:/data/data/com.mypackage/cucumber.json"})
This will generate an HTML report in the cucumber-html directory and a JSON report. The
pretty
formatter writes toSystem.out
, which will appear as nicely colored output in your logcat, given you use a color aware terminal. See Cucumber Reports for supported formatters/reporters.After test execution reports can be pulled from the device:
adb pull /data/data/com.mypackage/cucumber-html
adb pull /data/data/com.mypackage/cucumber.json
You can also write reports to the SD card.
Note that the html reporter requires the cucumber-html jar in the libs directory of your Android test project.