Skip to content

Reports are wrong on parallel (sharded) tests #85

@jdmwood

Description

@jdmwood

Bug report

  • Your protractor configuration file
exports.config = {
  multiCapabilities: [
    {
      shardTestFiles: true,
      maxInstances: 2,
      browserName: 'chrome',
    }
  ],

  specs: [
    '../test/screenshottest/**/*.js'
  ],

  // Default URL to be passed to Protractor
  //baseUrl: 'http://localhost:3000',

  // Framework to be used by Protractor
  framework: 'jasmine2',

  plugins: [{
    package: 'protractor-screenshoter-plugin',
    screenshotPath: './REPORTS/e2e',
    screenshotOnExpect: 'failure+success',
    screenshotOnSpec: 'none',
    withLogs: true,
    writeReportFreq: 'asap',
    imageToAscii: 'none',
    clearFoldersBeforeTest: true
  }],

  // Setup
  onPrepare: () => {
    browser.waitForAngularEnabled(false);

    // returning the promise makes protractor wait for the reporter config before executing tests
    return global.browser.getProcessedConfig().then(function(config) {
      //it is ok to be empty
    });
  }
};
  • Protractor Version: tested in 5.40 and 6.0.0
  • Browser(s): Chrome 73.0.3683.86
  • Node Version: 11.5.0
  • Angular Version: N/A
  • Operating System and Version: MacOS 10.14.2
  • A relevant example test: See below
  • Output from running the test

The report shows the wrong number of tests - it shows whichever tests were run in one of the browser instances

  • Steps to reproduce the bug
  1. Unzip the Zip
  2. cd into the folder
  3. npm install && npm test
  4. Open up REPORTS/e2e/index.html
  5. It should show all 4 test failures, but it only shows 2. E.g.:

Screenshot 2019-03-29 at 12 20 14

It looks like the report gets cleared whenever one of the browser instances closes?

PS: I also tried with later protractor and webdriver-manager (^6.0.0 and webdriver-manager ^13.0.0). You can see this in * protractor-bug-1.zip. Not sure this is working correctly as I get weird errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions