Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
wdio-reportportal-reporter
Advanced tools
A WebdriverIO reporter plugin to report results to Report Portal(http://reportportal.io/).
The easiest way is to keep wdio-reportportal-reporter
as a devDependency in your package.json
.
{
"devDependencies": {
"wdio-reportportal-reporter": "~0.0.8"
}
}
You can simple do it by:
npm install wdio-reportportal-reporter --save-dev
Instructions on how to install WebdriverIO
can be found here.
Configure the output directory in your wdio.conf.js file:
exports.config = {
// ...
reporters: ['reportportal'],
reporterOptions: {
reportportal: {
rpConfig: {
token: '00000000-0000-0000-0000-00000000000',
endpoint: 'https://reportportal-url/api/v1',
launch: 'launch_name',
project: 'project_name',
mode: 'DEFAULT'
},
enableSeleniumCommandReporting: false,
enableScreenshotsReporting: false,
seleniumCommandsLogLevel: 'debug',
screenshotsLogLevel: 'info',
}
},
// ...
}
Api methods can be accessed using:
const reporter = require('wdio-allure-reporter')
sendLog(level, message)
– send log to current suite\test item.
level
(String) - log level. Values ['trace', 'debug', 'info', 'warn', 'error'].message
(String)– log message content.sendFile(level, name, content, [type])
– send file to current suite\test item.
level
(String) - log level. Values ['trace', 'debug', 'info', 'warn', 'error'].name
(String)– file name.content
(String) – attachment contenttype
(String, optional) – attachment MIME-type, image/png
by defaultsendLogToLastFailedTest(level, message)
- send log to last failed test item.
level
(String) - log level. Values ['trace', 'debug', 'info', 'warn', 'error'].message
(String)– log message content.sendFileToLastFailedTest(level, name, content, [type])
– send file to last failed test item.
level
(String) - log level. Values ['trace', 'debug', 'info', 'warn', 'error'].name
(String)– file name.content
(String) – attachment contenttype
(String, optional) – attachment MIME-type, image/png
by defaultPay attention: sendLog
\sendFile
sends log to current test item. It means if you send log without active test(e.g from hooks or on suite level) you will not be able to access them in Report Portal UI.
Methods sendLogToLastFailedTest
\sendFileToLastFailedTest
are useful when you need to send screenshots or logs to the failed test item from wdio afterTest hook.
Mocha example:
const reporter = require('wdio-allure-reporter');
exports.config = {
...
afterTest: async function afterTest(test) {
if (test.passed === false) {
const screenshot = await browser.saveScreenshot();
reporter.sendFileToLastFailedTest('error', 'failed.png', screenshot);
}
},
...
This project is licensed under the MIT License - see the LICENSE.md file for details
FAQs
A WebdriverIO v6 plugin. Report results to Report Portal.
The npm package wdio-reportportal-reporter receives a total of 19,990 weekly downloads. As such, wdio-reportportal-reporter popularity was classified as popular.
We found that wdio-reportportal-reporter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.