1

I need to get my protractor tests to run using Jenkins. I know this has been asked before, and this seems like a really good answer. But I'm confused about where the bash script comes from and how to move forward. Here's what I've got:

Protractor config file:

var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter');
require('jasmine-reporters');

exports.config = {
  seleniumAddress: 'http://localhost:4444/wd/hub',
  capabilities: {
    'browserName': 'chrome'
  },
  framework: 'jasmine2',
  suites: {...},
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 10000
  },
  onPrepare: function() {
    global.isAngularSite = function(flag) {
      browser.ignoreSynchronization = !flag;
    };
    browser.manage().window().setPosition(0,0);
    browser.manage().window().setSize(1280, 1024);
  }
  jasmine.getEnv().addReporter(
    new jasmine.JUnitXmlReporter('protractor_output', true, true)
  );
}

How can I get my tests to run with Jenkins? Please help

Community
  • 1
  • 1
cocoa
  • 3,806
  • 7
  • 29
  • 56
  • 1
    How do you run your protractor tests? Do you use command line for that? – Priyanshu Jul 09 '15 at 09:41
  • Yes, I have a terminal window open for webdriver and one for protractor – cocoa Jul 09 '15 at 15:24
  • Then configure the Jenkins job which will run the tests using same command by which you run the tests locally. To know how to run sh commands in Jenkins please follow http://stackoverflow.com/questions/30374998/run-a-command-shell-in-jenkins – Priyanshu Jul 09 '15 at 16:34

0 Answers0