reportportal / agent-js-nightwatch

Agent to integrate NightwatchJS with ReportPortal.
https://www.npmjs.com/package/@reportportal/agent-js-nightwatch
Apache License 2.0
2 stars 2 forks source link

[help] Nightwatch agent throws error #51

Closed mchundi closed 4 months ago

mchundi commented 5 months ago

Hi, I am new to Nighwatch. I integrated reportportal in my suite but I am seeing this error:

✖ TypeError
   Cannot destructure property 'endTime' of 'utils_1.getLastItem(...)' as it is undefined.
    Stack Trace :
    at PostFactumReporter.report (/service/node_modules/@reportportal/agent-js-nightwatch/build/postFactumReporter/index.js:54:17)
    at /service/node_modules/@reportportal/agent-js-nightwatch/build/postFactumReporter/index.js:49:30
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

rp.json

{
  "apiKey": "key",
  "endpoint": "http://XXXX/api/v1",
  "project": "SERVICE",
  "launch": "test",
  "attributes": [
    {
      "key": "component",
      "value": "abc"
    }
  ],
  "description": "test run for reportportal",
  "rerun": true,
  "mode": "DEFAULT",
  "debug": false,
  "parallelRun": true
}

reporter.js

const { PostFactumReporter } = require('@reportportal/agent-js-nightwatch');
const config = require('./rp.json');
const reporter1 = new PostFactumReporter(config);

module.exports = {
    write : (results, options, done) => {
        return reporter1.startReporting(results, done);
    },
};
mchundi commented 4 months ago

Working now after fixing versions