Report Portal throws error related to status code when using RP V5

What are you trying to achieve?

Trying to run tests and push output to Reportportal V5.

What do you get instead?

(node:35244) UnhandledPromiseRejectionWarning: Error: Request failed with status code 400: {"errorCode":4001,"message":"Incorrect Request. [Value is not allowed for field 'status'.] "}
    at /Users/****/***************/**********************************************/node_modules/reportportal-client/lib/rest.js:27:23
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Details

  • CodeceptJS version: 2.3.5
  • NodeJS Version: 12.11.0
  • Operating System: MacOS Catalina 10.15
  • WebDriverIO: 5.15.2
  • Configuration file:

NOTE

  • The issue does not affect the tests or test runtime
  • The issue caused is inside ReportPortal where the tests don’t know when they ended thus the test run duration is inaccurate and it forces the user to manually stop the test sessions inside reportportal Launches section.

@unreal2frag do you use @peterngtr https://github.com/PeterNgTr/codeceptjs-rphelper ? I think it is not tested with RP v5 yet, or?

@paulb v5 was not born by the time I wrote that helper :stuck_out_tongue:

2 Likes

so @paulb I just had a chance to test my helper against v5. It works great! Also I updated something to make it better. More info could be seen in here https://github.com/PeterNgTr/codeceptjs-rphelper/blob/master/.github/CHANGELOG.md :slight_smile:

2 Likes

Hei,
I am facing a similar kind of issue with the report portal.

I have configured as per instruction from this site GitHub - reportportal/agent-js-codecept: Agent for integration CodeceptJS with ReportPortal.

Report portal has published the report but the launcher is not stopping, it never stops.I have to manually “Force finish” from the launch page.

below i have pasted the exception I was getting.

OK | 4 passed // 36s
codeceptjs:reportportal Finishing launch… +2ms
(node:16264) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘promiseFinish’ of undefined
at E:\lra\idporten-tests\node_modules@reportportal\client-javascript\lib\report-portal-client.js:516:69
at Array.map ()
at RPClient.finishTestItem (E:\lra\idporten-tests\node_modules@reportportal\client-javascript\lib\report-portal-client.js:516:38)
at EventEmitter. (E:\lra\idporten-tests\node_modules@reportportal\agent-js-codecept\index.js:232:16)
at EventEmitter.emit (events.js:327:22)

my setup for the report portal and codeceptjs
Report Portal 2021 Build: 5.3.5
reportportal/agent-js-codecept": "^0.2.4

to execute the test and publish the report I am using the below command.

$ DEBUG=“codeceptjs:reportportal” npx codeceptjs run

could you please help me to resolve this issue?