jasmine.getEnv().addReporter(new jasmine.TeamcityReporter());
just gives an error. How do I use teamcity reporter?
Thanks!
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());
}
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