4

I am trying to run E2E tests on multiple browsers on browser stack, I took the reference from E2E testing on multiple/parallel browsers in Protractor? and Internet Explorer Selenium protractor e2e tests

but the error I get every time I try to run the tests -

ERROR - Unable to start a WebDriver session. C:\MrWhiteMVP\whitemvp-integrationtests_develop\node_modules\gulp-protractor\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:113 var template = new Error(this.message); ^ UnknownError: Authorization required at new bot.Error (C:\MrWhiteMVP\whitemvp-integrationtests_develop\node_modules\gulp-protractor\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:113:18) at Object.bot.response.checkResponse (C:\MrWhiteMVP\whitemvp-integrationtests_develop\node_modules\gulp-protractor\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\response.js:103:11)

But if I run the tests on 1 browser, then it works perfectly fine. this is how my conf file looks like

    'use strict';
    exports.config = {
    seleniumAddress: 'http://hub.browserstack.com/wd/hub',

        multicapabilities: [{
            'browserstack.user': 'testuser',
            'browserstack.key': 'testkey',

            // Needed for testing localhost
                // 'browserstack.local': 'true',

            // Settings for the browser you want to test
            'browserName': 'chrome',
            'version': '36.0',
            'os': 'OS X',
            'os_version': 'Mavericks',
            'resolution': '1024x768'
        },
    {

    'browserstack.user': 'testuser',
    'browserstack.key': 'testkey',

    // Needed for testing localhost -  'browserstack.local': 'true',

    // Settings for the browser 

            'browserName': 'firefox',
    'os': 'windows'        
    }],  

    baseUrl: 'http://origin-develop.mvp.livebranches.com',

        // The require statement must be down here, since jasmine-reporters
            // needs jasmine to be in the global and protractor does not guarantee
            // this until inside the onPrepare function.

     onPrepare: function() 

    {
    require('jasmine-reporters');
    jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter('xmloutput', true, true));

    },



        },
    };

could anyone please tell me what am I doing wrong here, also we use gulp ti run specs but my problem is it is saying not even going beyond authentication.

Community
  • 1
  • 1
hny2015
  • 247
  • 2
  • 4
  • 12
  • At least `multicapabilities` should be `multiCapabilities` (camelCase). Also, what if you run it directly without gulp: `protractor conf.js`? What protractor version are you using? Thanks. – alecxe Jan 27 '15 at 16:35
  • I solved it, some issues from browser stack side so their support helped out. Also, cameCase was good spot. it helped as well. Thanks a ton ! – hny2015 Jan 30 '15 at 10:08

1 Answers1

-1

I think that first of all, you have an extra comma on your config.

 onPrepare: function() 

{
require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter('xmloutput', true, true));

},



    }, <----- 
};
Bruno Soko
  • 614
  • 6
  • 18