Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cucumber collector port does not take the specified port from the configuration #56

Open
mdasberg opened this issue Dec 29, 2015 · 1 comment

Comments

@mdasberg
Copy link
Contributor

in the file

cucumber/index.js

the collector port is set to 3001

The option that is provided in the configuration

collectorPort: 9001

is not used.

@mdasberg
Copy link
Contributor Author

I use the following workaround to make the port available from the config like this:

cucumber: {
   options: {
      collectorPort: 0,
      noInject: true,
      coverageDir: 'path/to/protractor-coverage/cucumber',
      ...
      args: {
         params: {
            collectorPort: 0,
            ...
         },
         ...
      }
   }
}
var coverage = require('grunt-protractor-coverage/cucumber');

var coverageHook = function () {
    this.After(function (scenario, callback) {
        coverage.options.port = browser.params.collectorPort; // update the port number
        coverage.getCoverage(callback);
    });
};

module.exports = coverageHook;

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

No branches or pull requests

1 participant