reportportal / agent-js-webdriverio

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

How to disable Report Portal in WebdriverIO during local execution #59

Closed adityagautam closed 4 months ago

adityagautam commented 8 months ago

What is the correct way to disable sending test results to report portal during local test execution.

AmsterGet commented 8 months ago

Hi @adityagautam ! You can just not provide the RP reporter in wdio config based on some parameter (e.g. some ENV identifier). Hope this helps!

AmsterGet commented 7 months ago

Hi @adityagautam ! I mean smth like this

// wdio.conf.js

exports.config = {
// ...
   reporters: isLocal ? [] : [[Reporter, rpConfig]],
// ...
};

Let me know if this helps!

AmsterGet commented 5 months ago

Hi @adityagautam ! Were you able to check out my suggestion? Is this issue still relevant for you?

umarkhanTR commented 5 months ago

I guess it won't work and will result in error. reporters: isLocal ? [] : [[Reporter, rpConfig]],

try following

reporters: isLocal ? 'spec' : [[Reporter, rpConfig]],

AmsterGet commented 4 months ago

@umarkhanTR Empty array is acceptable, referring wdio docs.

AmsterGet commented 4 months ago

I will close this ticket, feel free to open a new one if you have any questions.