Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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)

Awesome Lists containing this project

README

        



Markdownify


Next Gen Report 💎



GitHub

  

Pipeline Status

  

Ruby Version

  

Gem Version



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**


Markdownify




Markdownify

## **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")
end

at_exit do
$NxgReport.build()
end
```

## **Like it?**

Buy Me A Coffee

## **License**

Copyright © 2020 [MIT License](LICENSE)