Protractor: How to use TeamCity Reporter?

Created on 4 Dec 2013  路  7Comments  路  Source: angular/protractor

jasmine.getEnv().addReporter(new jasmine.TeamcityReporter());

just gives an error. How do I use teamcity reporter?

Thanks!

question

Most helpful comment

@cscleison It depends on the version:
Jasmine 1.x - new jasmine.TeamcityReporter()
Jasmine 2.x - new jasmineReporters.TeamCityReporter()
See here for more details: https://github.com/larrymyers/jasmine-reporters

All 7 comments

Hmm.. can't find anything regarding this on stackOverflow.
Jasmine-node normally autodetects teamcity and will output using teamcity reporter. It can also be passed as a command-line parameter --teamcity. I have no idea how to use this with Protractor though. Any ideas?

Just had to do npm install jasmine-reporters !

Could you elaborate on this a bit more? If all I do is npm install jasmine-reporters it does nothing. If i then add require('jasmine-reporters') to the protractor.conf.js it fails with jasmine is not defined.

If I add the onPrepare bit shown above it fails with undefined is not a function. I can't find any actionable info at all about protractor and runners :(

FYI, put the require inside the onPrepare

  onPrepare: function () {
      require('jasmine-reporters');
      jasmine.getEnv().addReporter(new jasmine.TeamcityReporter());
  },

I was getting case sensitive problems. Try new jasmineReporters.TeamCityReporter()

@cscleison It depends on the version:
Jasmine 1.x - new jasmine.TeamcityReporter()
Jasmine 2.x - new jasmineReporters.TeamCityReporter()
See here for more details: https://github.com/larrymyers/jasmine-reporters

this worked for me.
onPrepare() {
var jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmineReporters.TeamCityReporter());
}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rafalf picture rafalf  路  3Comments

codef0rmer picture codef0rmer  路  3Comments

vishalshivnath picture vishalshivnath  路  3Comments

koshkarov picture koshkarov  路  3Comments

nt3rp picture nt3rp  路  3Comments