BorisOsipov / wdio-reportportal-reporter

A WebdriverIO plugin. Report results to Report Portal.
MIT License
23 stars 29 forks source link

ReportPortal Launch Not Closing #61

Closed garethleonard closed 5 years ago

garethleonard commented 5 years ago

The problem

The ReportPortal launch does not close after the test is complete

Environment

Details

After the test run is complete the ReportPortal launch is not closed, it remains running and eventually times out.

Code To Reproduce Issue [ Good To Have ]

const reportportal = require('wdio-reportportal-reporter');
const RpService = require('wdio-reportportal-service');

const conf = {
  reportPortalClientConfig: {
    token: process.env.RP_TOKEN,
    endpoint: 'http://localhost:8080/api/v1',
    launch: 'android',
    project: 'android',
    mode: 'DEFAULT',
    debug: false,
    description: `Android Test Automation`,
    tags: ['android']
  },
  reportSeleniumCommands: false,
  autoAttachScreenshots: false,
  seleniumCommandsLogLevel: 'debug',
  screenshotsLogLevel: 'info',
  parseTagsFromTestTitle: false
};
exports.config = {
  // ====================
  // Runner and framework
  // Configuration
  // ====================
  runner: 'local',
  framework: 'jasmine',
  jasmineNodeOpts: {
    defaultTimeoutInterval: 90000
  },
  sync: true,
  logLevels: 'silent',
  deprecationWarnings: true,
  bail: 0,
  waitforTimeout: 10000,
  connectionRetryTimeout: 90000,
  connectionRetryCount: 3,
  services: [[RpService, {}]],
  reporters: [[reportportal, conf]],
  // ====================
  // Some hooks
  // ====================
  beforeSession: (config, capabilities, specs) => {
    require('@babel/register');
  }
};
BorisOsipov commented 5 years ago

Hi @garethleonard thanks for feedback

1) are there any error logs? 2) could you please share repo with reproducable example it will help a lot.

prathameshnyt commented 5 years ago

Looks like I am also running into the same issue.

  1. Node - v10.15.2
  2. WebdriverIO Version - 5.7.8
  3. Framework- Mocha

We have return new Promise(resolve => setTimeout(resolve, 5000)); in onComplete for v4 version and it worked fine. I have added same in v5 as well.

Please check trace output here. Hope it helps.

BorisOsipov commented 5 years ago

@prathameshnyt could you please share repo with reproducable example

prathameshnyt commented 5 years ago

Thanks @BorisOsipov. As per your doc added "wdio-reportportal-service": "5.0.0" in package.json with wdio-reportportal-reporter and

const trsService = require("wdio-reportportal-service"); services = ['selenium-standalone', [trsService, {}]]; in wdio.conf. It worked fine after that.

Is this expected behavior? I meant, do we need to now add this service as well?

BorisOsipov commented 5 years ago

Is this expected behavior? I meant, do we need to now add this service as well?

yes it is described in reporter docs.