allure-env-properties-adder
v1.1.0
Published
Node module to add K-V pairs to allure report
Downloads
5,729
Maintainers
Readme
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
Debugging
CLI
Pass --debug
with cli options
Programmatically
Use debug: true
when creating the object of AllureEnvPropsAdder