protractor icon indicating copy to clipboard operation
protractor copied to clipboard

How to use TeamCity Reporter?

Open hanssgo opened this issue 12 years ago • 7 comments

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

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

Thanks!

hanssgo avatar Dec 04 '13 20:12 hanssgo

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?

hanssgo avatar Dec 09 '13 22:12 hanssgo

Just had to do npm install jasmine-reporters !

hanssgo avatar Dec 10 '13 02:12 hanssgo

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 :(

worldspawn avatar Apr 17 '14 00:04 worldspawn

FYI, put the require inside the onPrepare

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

worldspawn avatar Apr 17 '14 00:04 worldspawn

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

cscleison avatar Feb 20 '15 15:02 cscleison

@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

yaroslavya avatar Mar 31 '15 07:03 yaroslavya

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

aniltomar10 avatar Oct 23 '18 20:10 aniltomar10