Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Using TAP reporter instead of DOT reporter means all processes exit with 0 no matter what #4575

Open
ORESoftware opened this issue Nov 7, 2017 · 1 comment

Comments

@ORESoftware
Copy link

When I switch to TAP reporter, Protractor process will always exit with 0, even if tests fail.
With the default DOT reporter, behavior is normal, but not with the TAP reporter.

I have this configuration:

'use strict';

const jasmineReporters = require('jasmine-reporters');
const util = require('util');

exports.config = {

  params: {
    env: process.env.CDT_PROTRACTOR_ENV || 'local'
  },

  noColors: true || process.env.PROTRACTOR_NO_COLORS === 'yes',
  chromeDriver: '/usr/bin/google-chrome',

  onPrepare: function () {
    let env = jasmine.getEnv();
    env.clearReporters();
    env.addReporter(new jasmineReporters.TapReporter());
  },

  jasmineNodeOpts: {
    noColors: true,
    showColors: false, // process.env.PROTRACTOR_NO_COLORS !== 'yes',
    defaultTimeoutInterval: 15000,
  },

  seleniumAddress: `http://${seleniumHost}:4444/wd/hub`,

  multiCapabilities: [

    {
      browserName: 'firefox',
      firefoxOptions: {
        args: ['--headless']
      },
      'moz:firefoxOptions': {
        args: ['--headless']
      }

    },
  ],

  specs:  testPaths || process.env.PROTRACTOR_TEST_PATH ||  './test/e2e/**/*spec.js'
};

Bug report

  • Node Version: 6/7/8
  • Protractor Version: Version 5.1.2
  • Angular Version: 1.6
  • Browser(s): Firefox
  • Operating System and Version MacOS
  • Your protractor configuration file

Any idea why my configuration will lead to tests always passing? It's something to do with switching to the TAP reporter in the onPrepare hook.

@wswebcreation
Copy link
Contributor

@ORESoftware Is this still relevant? Is still looks more like a third party software issue then a protractor issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants