Reduce Speed of Angular E2E Protractor Tests


In order to customize speed for protractor tests, You may utilize below code snippets. This will help you to debug your tests, watch them closely or to speed up the test cases flow.

Step1: Create customConfig.js file in your project and below code snippet in it.

var origFn = browser.driver.controlFlow().execute;
browser.driver.controlFlow().execute = function () {
    var args = arguments;, function () {
        //increase or reduce time value, its in millisecond
        return protractor.promise.delayed(200);
    return origFn.apply(browser.driver.controlFlow(), args);



Step2: Register this customConfig file to conf.js

// An example configuration file. 
exports.config = {
    // The address of a running selenium server. 
    seleniumAddress: 'http://localhost:4444/wd/hub', 
    // Capabilities to be passed to the webdriver instance. 
    capabilities: {
        'browserName': 'chrome'
    // Spec patterns are relative to the current working directly when 
    // protractor is called. 
    specs: ['customConfig.js', 'menu.js', 'homePage.js'], 
    // Options to be passed to Jasmine-node. 
    jasmineNodeOpts: {
        showColors: true, 
        defaultTimeoutInterval: 30000





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s