reportportal / agent-js-cucumber

Agent to integrate CucumberJS with ReportPortal.
https://www.npmjs.com/package/@reportportal/agent-js-cucumber
Apache License 2.0
12 stars 17 forks source link

report portal launch is failing to finish #168

Open rutika89 opened 1 month ago

rutika89 commented 1 month ago

Describe the bug ... Getting below error when the test execution finishes. /playwright/node_modules/@reportportal/client-javascript/lib/report-portal-client.js:589 new Error(Item with tempId "${itemTempId}" not found), ^ Error: Item with tempId "undefined" not found at RPClient.finishTestItem (/builds/future-state/cov/ait/playwright/node_modules/@reportportal/client-javascript/lib/report-portal-client.js:589:9) at CucumberReportPortalFormatter.finishFeature (/builds/future-state/cov/ait/playwright/node_modules/@reportportal/agent-js-cucumber/modules/cucumber-reportportal-formatter.js:169:25) at /builds/future-state/cov/ait/playwright/node_modules/@reportportal/agent-js-cucumber/modules/cucumber-reportportal-formatter.js:631:14 at Array.forEach () at CucumberReportPortalFormatter.onTestRunFinishedEvent (/builds/future-state/cov/ait/playwright/node_modules/@reportportal/agent-js-cucumber/modules/cucumber-reportportal-formatter.js:630:19) at CucumberReportPortalFormatter.eventHandler (/builds/future-state/cov/ait/playwright/node_modules/@reportportal/agent-js-cucumber/modules/cucumber-reportportal-formatter.js:82:23) at EventEmitter.emit (node:events:531:35) at Coordinator.onWorkerProcessClose (/builds/future-state/cov/ait/playwright/node_modules/@cucumber/cucumber/lib/runtime/parallel/coordinator.js:120:35) at ChildProcess. (/builds/future-state/cov/ait/playwright/node_modules/@cucumber/cucumber/lib/runtime/parallel/coordinator.js:93:18) at ChildProcess.emit (node:events:519:28)

Also, on report portal ui the launch is continually running.

Expected behavior ... Should be able to finish launch successfully.

Screenshots If applicable

Versions:

Pink-Bumblebee commented 1 month ago

@rutika89 , may I ask you about versions of reportportal's client-javascript and it's config? BTW, maybe this information will be helpful: https://medium.com/@reportportal.io/reportportal-integration-with-playwright-43f2e73401af

rutika89 commented 1 month ago

@Pink-Bumblebee using these versions reportportal/agent-js-cucumber: 5.4.0 reportportal-js-client: 2.2.1

and the config is as below

module.exports = {
  apiKey: process.env.RpApiKey,
  endpoint: process.env.RpApiBase,
  launch: process.env.CI_JOB_STAGE,
  project: process.env.RpProject,
  takeScreenshot: "onFailure",
  mode: "DEFAULT",
  debug: false,
  rerun: false,
  scenarioBasedStatistics: true,
  reportSkippedCucumberStepsOnFailedTest: true,
  description: `${process.env.CI_PIPELINE_URL}`,
  attributes: [
    {
      key: "job",
      value: process.env.CI_JOB_ID,
    },
    {
      key: "environment",
      value: process.env.ENVIRONMENT,
    },
],
};
AmsterGet commented 1 month ago

Hello @rutika89 ! Is it possible to reproduce this problem with the previous minor version of agent-js-cucumber (5.3.1)? Could you also provide a small example with tests where we can reproduce the issue? Thanks!

sreenidhi27 commented 2 weeks ago

I also faced the same issue with the latest version for "@reportportal/agent-js-cucumber": "^5.4.0" & is resolved when tried with the older version "@reportportal/agent-js-cucumber": "^5.3.1" @AmsterGet.

This issue still exists for the latest agent-js-cucumber version. Please do help to check.

Thanks for tip.