webdriverio: [🐛 Bug]: reportedEnvironmentVars not working
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
latest
Node.js Version
latest
Mode
WDIO Testrunner
Which capabilities are you using?
No response
What happened?
In the code below, I use the reportedEnvironmentVars option: in my wdio.conf.js file.
reporters: [ [ 'allure', { outputDir: 'allure-results', disableWebdriverScreenshotsReporting: false, disableWebdriverStepsReporting: true, addConsoleOutput: true, reportedEnvironmentVars: ['BASE_URL','BUILD','BUILD_VERSION'], }, ], ],
I have tried setting and updating the value of these environment variables, but am only shown an index number followed by the variable name in my report.
Formerly, I used addEnvironment(name, value), but this is now deprecated. The only documentation I’ve found is “reportedEnvironmentVars - Set this option to display the environment variables in the report. Note that setting this, does not modify the actual environment variables.”
What is your expected behavior?
I expect to see the same output as addEnvironment, with the name and value shown in my report.
How to reproduce the bug.
To reproduce the bug, use the reportedEnvironmentVars option, and define the environment variables.
Relevant log output
When logging the environment variables, my console shows the expected value.
Code of Conduct
- I agree to follow this project’s Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 22 (11 by maintainers)
Commits related to this issue
- document type for `reportedEnvironmentVars` refs #10956 @skip-ci — committed to webdriverio/webdriverio by christian-bromann 10 months ago
@jhaltrecht-rev you are right, the docs are not much clear about that. I pushed a commit to fix this.