Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between placing "allScriptsTimeout" inside and outside of "jasmineNodeOpts" in protractor conf.js?

There is some difference when I place the setting allScriptsTimeout inside and outside of the jasmineNodeOpts in protractor conf.js.

Please see the below examples, but in this which one is valid?

Outside jasmine node options:

exports.config = {
    framework: "jasmine2",

multiCapablities: [
    {'browserName' : 'chrome'},
    {'browserName':'firefox'}
],

allScriptsTimeout : 20000,

jasmineNodeOpts: {
    isVerbose: true,
    showColors: true,
    print: function () {
    },
    includeStackTrace: true,
    defaultTimeoutInterval: 400000
    //allScriptsTimeout: 550000
  }

}

Within jasmine node options:

exports.config = {
    framework: "jasmine2",

 multiCapablities: [
    {'browserName' : 'chrome'},
    {'browserName':'firefox'}
 ],

 jasmineNodeOpts: {
    isVerbose: true,
    showColors: true,
    print: function () {
    },
    includeStackTrace: true,
    defaultTimeoutInterval: 400000
    allScriptsTimeout: 200000
  }

}
like image 393
krishnarajanr Avatar asked Feb 07 '17 11:02

krishnarajanr


1 Answers

allScriptsTimeout should be part of config options and not jasmineNodeOpts. Please see below an extract on the significance of this setting.

The timeout in milliseconds for each script run on the browser. This should be longer than the maximum time your application needs to stabilize between tasks.

Jasmine provides only one timeout option - defaultTimeoutInterval. The documentation states this for defaultTimeoutInterval:

Default time to wait in ms before a test fails.

Protractor official documentation is the source of truth on different config options.

like image 73
AdityaReddy Avatar answered Sep 20 '22 00:09

AdityaReddy