protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Is their is possibility to run protractor test on different machine having different platform parallely

Open Saurabh06 opened this issue 10 years ago • 17 comments

whether we can run protractor test on different machine having different platform with different browser in parallel.

Saurabh06 avatar Feb 16 '16 07:02 Saurabh06

Hi there!

It sounds like you want a service like SauceLabs or BrowserStack but without more clarification it is hard to understand the exact use case.

Because of this, your question is better suited for StackOverflow or Gitter. Please ask a question there with the 'protractor' tag or post in the Gitter Channel to get help.

From the the getting help section of the README:

Please ask usage and debugging questions on StackOverflow (use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)

Thanks!

NickTomlin avatar Feb 16 '16 15:02 NickTomlin

Hi NickTomlin,

I want to run all the test on different machines having different platform and browser at a time in parallel. I have searched over a internet that with the help of SauceLabs we can run test on 1 machine remotely, but i want to run on different machine simultaneously with platform linux, windows.. Is this is right understanding or you want to add something..??

Saurabh06 avatar Feb 18 '16 06:02 Saurabh06

Hi Saurabh,

Steps to do:

  1. Protractor should be installed on other machines
  2. Run webdriver-manager start on other machines as well
  3. Mention below multiCapabilities on conf.js file and run /**********************************************************************/ multiCapabilities: [{ browserName: 'chrome', //mention machine1 ip-address in selenium address value //and give port id for selenium driver seleniumAddress: 'http://192.27.22.35:4444/wd/hub' }, { browserName: 'firefox', //mention machine2 ip-address in selenium address value //and give port id for selenium driver seleniumAddress: 'http://192.28.62.184:4444/wd/hub' }],

Hope, It would help you to meet your requirement.

sallojusuresh avatar Feb 18 '16 06:02 sallojusuresh

Thanks a lot @sallojusuresh . you made my day.. One more thing i have to ask that Is their any way to provide machine IP dynamically to the seleniumAddress

Saurabh06 avatar Feb 18 '16 15:02 Saurabh06

@sallojusuresh , sometime it gives timeout error and sometime it does not give any error while protractor test running.even though i have increased the default timeout in config file.

Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL

Can you help me out??

Saurabh06 avatar Feb 18 '16 15:02 Saurabh06

You are welcome Saurabh.

Increase jasmine_default_timeout_interval as well in conf.js file. Below code snippet will solve your problem:(add below code if you did not mentioned in the conf.js file)

jasmineNodeOpts: { defaultTimeoutInterval: 2500000 },

sallojusuresh avatar Feb 18 '16 15:02 sallojusuresh

Thanks @sallojusuresh, it is working..

Saurabh06 avatar Feb 19 '16 06:02 Saurabh06

@sallojusuresh Is their is anyway to run the spec test methods dynamically as per the given methods which is true in excel sheet.

Saurabh06 avatar Feb 19 '16 06:02 Saurabh06

I'm not clear about your question @Saurabbh, Do you want to run a specific test(it - blocks) by mentioning in excel sheet? like key word driven style.

sallojusuresh avatar Feb 19 '16 07:02 sallojusuresh

yes @sallojusuresh, i want to run specific test(it-blocks) by mentioning into excel sheet condition: if no. of it- block test present in describe block

Saurabh06 avatar Feb 19 '16 07:02 Saurabh06

As per i know, its not possible with Protractor.

But you can ignore a test(it block) by prefixing 'x' to 'it' (xit) or can run specific test by prefixing 'f' to 'it' (fit)

sallojusuresh avatar Feb 19 '16 09:02 sallojusuresh

Thanks @sallojusuresh for your continuous reply.Are we not able to run spec test in protractor dynamically as per user decision in excel or is their any alternative for that??

Saurabh06 avatar Feb 20 '16 05:02 Saurabh06

@sallojusuresh @Saurabh06

Please use another medium (like Gitter or StackOverflow) for debugging and usage. This helps us keep the issue queue focused on problems with protractor core. Thanks! :smile:

NickTomlin avatar Feb 20 '16 16:02 NickTomlin

Hi All,

I am running a test case in protractor getting timed out error. Here is the details. Please advice. Thank you

Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

sample_spec.js

describe('Mcac App testing', function() { browser.get('http://localhost:3000/integrated/myWeb.html'); beforeEach(function (done) { window.jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; setTimeout(function () { console.log('inside timeout'); done(); }, 50000); }); //browser.get(' http://localhost:3000/integrated/myWeb.html'); // browser.get('http://localhost:3000/integrated/myWeb.html').then(function() { it('Email Address Validation', function() {

            element(by.model('ctrl.formData.emailAddress')).sendKeys('').clear();
            element(by.model('ctrl.formData.emailAddress')).sendKeys('[email protected]');
            element(by.model('ctrl.formData.emailAddress')).getAttribute('value').then(function (value) {
                expect(value).toEqual('[email protected]');
            });


    }, 10000);

// element(by.xpath("//button[text()='Confirm']")).click(); browser.sleep(5000);

});

config.js

// An example configuration file. exports.config = { directConnect: true,

// Capabilities to be passed to the webdriver instance. capabilities: { 'browserName': 'chrome' },

// Framework to use. Jasmine is recommended. framework: 'jasmine',

// Spec patterns are relative to the current working directory when // protractor is called. // specs: ['example_spec.js'], //specs: ['mcac_spec.js'], //specs: ['mcac_spec_mobile.js'], specs: ['mcac_online.js'], // Options to be passed to Jasmine. jasmineNodeOpts: { defaultTimeoutInterval: 5000 }

};

any help much appreciated.

reddynr avatar Dec 06 '16 15:12 reddynr

@sallojusuresh,

Any help on above mentioned issue. much appreciated. Thanks

reddynr avatar Dec 06 '16 16:12 reddynr

Any help on the above issue 'Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.'. Thanks in Advance.

PavithraRavichandran avatar Mar 13 '17 17:03 PavithraRavichandran

Please direct any new usage question Stack Overflow or create a new issue.

I'm going to go ahead and lock this issue since it's become a bit of a magnet for other random requests. Thanks! 😄

NickTomlin avatar Mar 13 '17 21:03 NickTomlin