We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One way to get the launch id is through adding a custom reporter on top of this package.
const ReporPortalAgent = require('@reportportal/agent-js-mocha'); const fs = require('fs'); class ReporPortal extends ReporPortalAgent { constructor(runner, options) { super(runner, options); } onLaunchStart() { const systemAttributes = this.getSystemAttributes(); const launchAttributes = (this.options.reporterOptions.attributes || []).concat( systemAttributes, ); const { tempId, promise } = this.rpClient.startLaunch({ token: this.options.reporterOptions.token, name: this.options.reporterOptions.launch, startTime: this.rpClient.helpers.now(), description: this.options.reporterOptions.description, rerun: this.options.reporterOptions.rerun, rerunOf: this.options.reporterOptions.rerunOf, attributes: launchAttributes, }); promise .then(res => fs.writeFileSync('.env', `RP_LAUNCH_ID=${res.id}`)) .catch(err => console.error('Failed to launch run.', err)); this.launchId = tempId; } } module.exports = ReporPortal;
Is there a better way to do it.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
One way to get the launch id is through adding a custom reporter on top of this package.
Is there a better way to do it.
The text was updated successfully, but these errors were encountered: