Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Saurabh06 opened this issue Feb 16, 2016 · 17 comments

Comments

@Saurabh06
Copy link

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

@NickTomlin
Copy link
Contributor

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!

@Saurabh06
Copy link
Author

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..??

@sallojusuresh
Copy link

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.

@Saurabh06
Copy link
Author

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
Copy link
Author

@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??

@sallojusuresh
Copy link

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
},

@Saurabh06
Copy link
Author

Thanks @sallojusuresh, it is working..

@Saurabh06
Copy link
Author

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

@sallojusuresh
Copy link

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.

@Saurabh06
Copy link
Author

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

@sallojusuresh
Copy link

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)

@Saurabh06
Copy link
Author

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??

@NickTomlin
Copy link
Contributor

@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! 😄

@reddynr
Copy link

reddynr commented Dec 6, 2016

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('nancy@abc.com');
            element(by.model('ctrl.formData.emailAddress')).getAttribute('value').then(function (value) {
                expect(value).toEqual('narendra@abc.com');
            });


    }, 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
Copy link

reddynr commented Dec 6, 2016

@sallojusuresh,

Any help on above mentioned issue. much appreciated. Thanks

@PavithraRavichandran
Copy link

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

@NickTomlin
Copy link
Contributor

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! 😄

@angular angular locked and limited conversation to collaborators Mar 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants