Open contd opened 3 years ago
I think I was able to figure this out utilizing the .mocharc.yaml approach but I still need to specify multiple reporters. Is this possible with this approach or how can I accomplish this? I tried this which of course fails because of duplicate keys:
`inspect: 8888 require:
I had the same issues and errors because our Report Portal was set up to use HTTPS. I belive the package doesn't handle HTTPS requests correctly.
We tried different things, and the only solution was to switch to HTTP internal hosting, which resolved the issue.
I've had success using the postman/newman package running tests from package.json or as a command line reporter. I'm having trouble doing the same with the mocha (agent-js-mocha) one. Here is what I am trying:
mocha --inspect=8888 -r ts-node/register --reporter=@reportportal/agent-js-mocha --reporter-option agent-js-mocha-endpoint=https://reportportal.xxxxxx.com/api/v1 --reporter-option agent-js-mocha-token=xxxxxxxxx --reporter-option agent-js-mocha-launch=Helmsdeepcc-MochaTest tests/${1:-*}.spec.ts
This is the part of the output I'm getting where it seems like it is trying to send to the ReportPortal but not getting the options to know what endpoint and so on:
@apex-org/helmsdeep-cc: Failed to finish child item. Error: connect ECONNREFUSED 127.0.0.1:80 @apex-org/helmsdeep-cc: at axios.then.catch (/home/jason/apex/citadel/packages/helmsdeep/packages/helmsdeep-cc/node_modules/@reportportal/client-javascript/lib/rest.js:36:23) @apex-org/helmsdeep-cc: at process._tickCallback (internal/process/next_tick.js:68:7) @apex-org/helmsdeep-cc: Failed to finish suite. Error: connect ECONNREFUSED 127.0.0.1:80 @apex-org/helmsdeep-cc: at axios.then.catch (/home/jason/apex/citadel/packages/helmsdeep/packages/helmsdeep-cc/node_modules/@reportportal/client-javascript/lib/rest.js:36:23) @apex-org/helmsdeep-cc: at process._tickCallback (internal/process/next_tick.js:68:7) @apex-org/helmsdeep-cc: Failed to finish run. Error: connect ECONNREFUSED 127.0.0.1:80 @apex-org/helmsdeep-cc: at axios.then.catch (/home/jason/apex/citadel/packages/helmsdeep/packages/helmsdeep-cc/node_modules/@reportportal/client-javascript/lib/rest.js:36:23) @apex-org/helmsdeep-cc: at process._tickCallback (internal/process/next_tick.js:68:7)
Is there some example of using this agent from the command line that shows how to properly set the options?