How to Set Environment details for a Codeceptjs project
Currently, the environment section in the report for a codecept js project shows blank. What is the way to add the environment details?

My config file:

Can anyone help.
looking at allure environment documentation - the environment widget can be configured with an environment.properties or environment.xml file in the report directory.
heres an example using Codeceptjs event listener API to generate this file into the output directory after all tests have run:
const event = require('codeceptjs').event;
const conf = require('./codecept.conf.js').config;
const fs = require('fs');
event.dispatcher.on(event.all.after, () => {
let data = 'Environment=STAGE\nBrowser='+conf.helpers.WebDriver.browser
fs.writeFile(conf.output+'/environment.properties', data, (err) => {
if (err) throw err;
});
});
note: using the Codeceptjs API requires a local codeceptjs installation
will be fixed via https://github.com/allure-framework/allure-js/pull/909
since [email protected] you can specify environment info and categories via plugin config:
exports.config = {
plugins: {
allure: {
require: require.resolve("allure-codeceptjs"),
enabled: true,
environmentInfo: {
"app version": "123.0.1",
"some other key": "some other value",
},
categories: [...],
},
},
};