Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iambalabharathi/nxgreport
A ruby gem to generate a clean & beautiful e-mailable test report (13643 Downloads)
https://github.com/iambalabharathi/nxgreport
cucumber dashboard gem report ruby test-reporting
Last synced: about 1 month ago
JSON representation
A ruby gem to generate a clean & beautiful e-mailable test report (13643 Downloads)
- Host: GitHub
- URL: https://github.com/iambalabharathi/nxgreport
- Owner: iambalabharathi
- License: mit
- Created: 2020-09-05T23:37:22.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-16T11:35:02.000Z (over 1 year ago)
- Last Synced: 2024-11-14T14:20:55.716Z (about 2 months ago)
- Topics: cucumber, dashboard, gem, report, ruby, test-reporting
- Language: Ruby
- Homepage:
- Size: 23.6 MB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Next Gen Report 💎
A simple light weighted gem to generate a beautiful e-mailable test report. (7500+ Downloads)
Generates a static site (Supports Dark 🌓 mode).
Demo •
Installation •
Usage •
License## **Demo**
## **Installation**
gem install nxgreport
## **Usage**
```ruby
require 'nxgreport'$NxgReport.setup(location: "Absolute file path", title: "My Report")
$NxgReport.set_device(name: "iPhone X")
$NxgReport.set_os(name: "iOS 12.1")
$NxgReport.set_release(name: "M09 2020")
$NxgReport.set_app_version(no: "app0.9.1")
$NxgReport.set_environment(name: "QA")$NxgReport.log_test(
feature_name: "Feature Name",
test_name: "This is a test",
test_status: "Pass/Fail",
comments: "Error message or additional comments about the test",
tag: "critical")$NxgReport.build()
```## **Cucumber-Ruby Usage**
In `env.rb` add the below line
```ruby
require 'nxgreport'$NxgReport.setup(location: "Absolute file path", title: "My Report")
$NxgReport.set_device(name: "iPhone X")
$NxgReport.set_os(name: "iOS 12.1")
$NxgReport.set_release(name: "M09 2020")
$NxgReport.set_app_version(no: "app0.9.1")
$NxgReport.set_environment(name: "QA")
```In `hooks.rb` add the below block of code.
```ruby
After do |scenario|feature_name = scenario.feature.name
scenario_status = !scenario.failed?() ? "Pass" : "Fail"
comments = (scenario.exception.nil?) ? "Success" : scenario.exception.message$NxgReport.log_test(
feature_name: feature_name,
test_name: scenario.name,
test_status: scenario_status,
comments: comments,
tag: "critical")
endat_exit do
$NxgReport.build()
end
```## **Like it?**
## **License**
Copyright © 2020 [MIT License](LICENSE)