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

Using junit reporter with cucumber-boilerplate seems to not work #73

Closed
inspiraller opened this issue Mar 29, 2017 · 1 comment
Closed

Comments

@inspiraller
Copy link

inspiraller commented Mar 29, 2017

Using cucumber-boilerplate with junit reporter, I get an error:
This is inside my wdio.conf:

    reporters: ['spec','junit'],
    reporterOptions: {
        junit: {
            outputDir: './reports/'
        }
    },  

This is are my package.json dependencies:

    "babel-polyfill": "~6.20.0",
    "babel-preset-es2015": "~6.18.0",
    "babel-register": "~6.18.0",
    "chai": "~3.5.0",
    "cucumber": "^1.3.1",
    "eslint": "~3.13.1",
    "eslint-config-airbnb-base": "~11.0.1",
    "gulp": "^3.9.1",
    "gulp-util": "^3.0.8",
    "gutil": "^1.6.4",
    "lodash": "^4.17.4",
    "node-notifier": "^5.1.2",
    "wdio-cucumber-framework": "~0.2.15",
    "wdio-junit-reporter": "^0.3.0",
    "wdio-phantomjs-service": "~0.2.2",
    "wdio-selenium-standalone-service": "~0.0.7",
    "wdio-spec-reporter": "~0.0.5",
    "webdriverio": "~4.6.1"

This is my gulp task which triggers the test:

gulp.task('webdriverTest', ['selenium'], function() {
  var creatLauncherWithConfig = function(env){
    var strFile = path.join(__dirname, 'wdio.conf.js');
	  var wdio = new Launcher(strFile);	  
    return wdio;
  }
  var wdio = creatLauncherWithConfig(gutil.env);
  wdio.run().then(function (code) {
      process.exit(code);
    }, function (error) {
      console.error('Launcher failed to start the test', error.stacktrace);
      process.exit(1);
  });
});

This is the error:

cucumber_boilerplate_prototype\node_modules\webdriverio\build\lib\utils\BaseReporter.js:336
                        throw _iteratorError;
                        ^

TypeError: Cannot read property 'toLowerCase' of undefined
    at JunitReporter.prepareName (c:\projects\cucumber_boilerplate_prototype\node_modules\wdio-junit-reporter\build\reporter.js:98:24)
    at JunitReporter.prepareXml (c:\projects\cucumber_boilerplate_prototype\node_modules\wdio-junit-reporter\build\reporter.js:147:57)
    at JunitReporter.onEnd (c:\projects\cucumber_boilerplate_prototype\node_modules\wdio-junit-reporter\build\reporter.js:75:36)
    at emitOne (events.js:77:13)
    at JunitReporter.emit (events.js:169:7)
    at BaseReporter.handleEvent (c:\projects\cucumber_boilerplate_prototype\node_modules\webdriverio\build\lib\utils\BaseReporter.js:324:35)
    at Launcher.endHandler (c:\projects\cucumber_boilerplate_prototype\node_modules\webdriverio\build\lib\launcher.js:637:28)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

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

2 participants