Skip to content

shoaibm-aurea/allure-env-properties-adder

 
 

Repository files navigation

Allure Env Properties Adder

Node module to add K-V pairs to allure report

npm i allure-env-properties-adder

# For easier cli usage install the package globally
npm i -g allure-env-properties-adder

Usage

From CLI:

npm i -g allure-env-properties-adder

# allure-env-properties-adder <K-V pairs>
allure-env-properties-adder "--props.K1=V1" "--props.K2=V2"

Check allure-env-properties-adder --help to get full list of command line options

It can also be used with Jasmine and Protractor with Jasmine frameworks programmatically

const AllureEnvPropsAdder = require('allure-env-properties-adder').AllureEnvPropsAdder;

jasmine.getEnv().addReporter(new AllureEnvPropsAdder({
            outputDir: <path to allure-results dir>,       // optional [default: '.']
            fileName: <file-name>,      // optional [default: 'environment.properties']
            debug: false,               // optional [default: false]
            override: true,             // optional [default: true]
            props: {                    // mandatory {K-V pairs}
                BASE_URL: 'http://test.com',
                ENVIRONMENT: 'STAG',
            }
        }));

Sample Report

Allure Screenshot

Debugging

CLI

Pass --debug with cli options

Programmatically

Use debug: true when creating the object of AllureEnvPropsAdder

About

Node module to add K-V pairs to allure report

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%