0

I have set up Jenkins Slave on Windows VM. when there are failures in my tests , the build status always shows succeeded.

Here is how I run protractor tests on jenkins

Windows PowerShell command :

cd conf protractor ConfProd.js

My Conf file:

var HtmlReporter = require('protractor-html-screenshot-reporter');


exports.config = {
    seleniumAddress: 'http://localhost:4444/wd/hub', //desktop

    allScriptsTimeout: 60000,
    baseUrl: 'https://myTest.com',
    params: {
    empUrl: 'https://employeeurl.com/',
  },

    // frameworks to use
    frameworks: 'jasmine2',
    directConnect: 'true',


    //Capabilities to be passed to the webdriver instance.

    multiCapabilities: [{

      'browserName': 'chrome',
      'chromeOptions' : {
      args: ['--window-size=1200,1200']
     }, 
     specs: [
       '../tests/*.spec.js'
     ],     
   },

   {
    'browserName': 'firefox',
    'firefoxOptions' : {
     args: ['--window-size=900,900']
   }, 
   specs: [
   '../tests/*.spec.js'
   ],     
    exclude: ['../tests/EmployeeTests.spec.js'],


    }],




   onPrepare: function () {

    jasmine.getEnv().addReporter(new HtmlReporter({
      baseDirectory: '/tmp/screenshots',

       docTitle: 'TestReports',
       takeScreenShotsOnlyForFailedSpecs: true

     }));



  },



  jasmineNodeOpts: {
    showColors: true,
    isVerbose: true,
    includeStackTrace: true,


  }

};

This is the message from console output on Jenkins:

[launcher] chrome #1 failed 4 test(s)
[launcher] firefox #2 failed 4 test(s)
[launcher] overall: 8 failed spec(s)
Checking for post-build
Performing post-build step
Checking if email needs to be generated
No emails were triggered.
Finished: SUCCESS
user2744620
  • 439
  • 1
  • 9
  • 21
  • Without more information this is going to be hard to troubleshoot. I am unfamiliar with PowerShell but your `cd conf protractor ConfProd.js` seems malformed? In unix land it would be `cd conf; protractor ConfProd.js` which would cd and _then_ run protractor. Please provide some additional details including your configuration file and any relevant output. – Nick Tomlin Oct 30 '15 at 17:59
  • Just updated the post with Config file and Jenkins output. Thanks for the help – user2744620 Oct 30 '15 at 18:14
  • Possible duplicate of [How to stop protractor from running further testcases on failure?](http://stackoverflow.com/questions/28893436/how-to-stop-protractor-from-running-further-testcases-on-failure) – MBielski Oct 30 '15 at 19:44
  • @user2744620 any conclusions on this? – taguenizy Dec 19 '16 at 13:47

0 Answers0