Project

nxgreport

0.0
No release in over a year
Generate a beautiful emailable test report.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 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

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

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.

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