admin管理员组

文章数量:1287956

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
  }

}

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
  }

}
Share Improve this question edited Apr 17, 2019 at 13:42 Bruno Bieri 10.3k11 gold badges65 silver badges96 bronze badges asked Feb 7, 2017 at 11:24 krishnarajanrkrishnarajanr 6968 silver badges21 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 10

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.

本文标签: