Skip to content
New issue

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

Merge parallel launches #65

Closed
drewrichardson2 opened this issue Dec 8, 2020 · 0 comments · Fixed by #87
Closed

Merge parallel launches #65

drewrichardson2 opened this issue Dec 8, 2020 · 0 comments · Fixed by #87
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@drewrichardson2
Copy link

We run our tests in parallel in circle-ci using the cypress-orbs. We've got a couple different reporters configured so I use a custom cypress runner that also configures report portal. Providing the isLaunchMergeRequired option as true does not work and providing autoMerge as true causes tests to never finish inside of Report Portal. I'd like the launches to be merged once they all finish in parallel, similar to this issue here on another agent: reportportal/agent-net-specflow#35

This issue is created out of this post in slack here: https://reportportal.slack.com/archives/C2GTJTTNH/p1607090566045400?thread_ts=1606931183.021600&cid=C2GTJTTNH

Here is my configuration file for cypress/reportPortal. I've taken the merge code out for now as it wasn't working.

const CYPRESS = require('cypress');
const FS = require('fs');
const GLOB = require('glob');
const REPORTPORTAL = require('@reportportal/agent-js-cypress')
const ARGS = process.argv.slice(2)
const REPORTERCONFIGFILE = 'cypress/reporters/reportPortal.json';
const TAG = ARGS[0].toUpperCase()
const GROUP = ARGS[1]
let environment = TAG.includes("staging")?'staging':'daily'
let config;

const DATA = FS.readFileSync(REPORTERCONFIGFILE, 'utf8') 

config = JSON.parse(DATA)
config.reporterOptions.token = process.env.RPP_TOKEN
config.reporterOptions.launch = TAG + " " + process.env.CIRCLE_SHA1.substring(0,8)
CYPRESS.run({
  reporterOptions : config.reporterOptions,
  parallel: true,
  record: true,
  browser: "chrome",
  headless: true,
  key: process.env.CYPRESS_RECORD_KEY,
  tag: TAG,
  group: GROUP,
  config: {
    baseUrl: environment,
  },
  reporter: "@reportportal/agent-js-cypress",
  env: {
    grep: "@Flaky",
    invert: true}
  }).then(
    () => {
      process.exit(0)
    });

Perhaps we could set the launch id to the commit sha somehow so it's always unique, then once it gets to report portal it detects they're all the same and merges?

@AmsterGet AmsterGet self-assigned this Dec 9, 2020
@AmsterGet AmsterGet added this to the 5.0.2 milestone May 18, 2021
@AmsterGet AmsterGet linked a pull request May 18, 2021 that will close this issue
@AmsterGet AmsterGet added the enhancement New feature or request label May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants