Skip to content

Edited: Question/Issue: Parallel testing using Browserstack + CodeceptJS/Protractor #433

@lisettea

Description

@lisettea

What are you trying to achieve?

Trying to run parallel tests using Browserstack's 'multicapabilities' option on codeceptJS - Protractor

What do you get instead?

When adding multicapabilities to my config file and attempting to run a test, I get an error message on my consolei, where multiCapabilities is called as undefined

Question/Issue

Do I need to alter things in the Protractor.js file to get this to work for me?
Or is it simply not yet possible to utilise Protractor/Browserstack's multiCapabilities function at thist ime?

Couldn't load helper Protractor from module '.helper/Protractor': Cannot read property 'multiCapabilities' of undefined {}

Details

  • CodeceptJS version: 0.5.0
  • NodeJS Version:
  • Operating System: Windows
  • Protractor : 5.1.1
class Protractor extends SeleniumWebdriver {

  constructor(config) {
    super(config);
    this.options = {
      browser: '',
      url: 'http://localhost',
      seleniumAddress: 'http://localhost:4444/wd/hub',
      rootElement: 'body',
      scriptsTimeout: 10000,
      waitForTimeout: 1000, // ms
      windowSize: null,
      driver: 'hosted',
      capabilities: {}
    };


    this.options = Object.assign(this.options, config);
    if (!this.options.allScriptsTimeout) this.options.allScriptsTimeout = this.options.scriptsTimeout;
    if (this.options.proxy) this.options.capabilities.proxy = this.options.proxy;
    if (this.options.browser) this.options.capabilities.browserName = this.options.browser;
    this.options.waitForTimeout /= 1000; // convert to seconds
  }
  • Configuration file:
exports.config = {

   tests: 'tests/Uitvoeren/*.js',
    timeout: 10000,
    output: './output',
    helpers: {
    Protractor: {
        'seleniumAddress': 'http://hub-cloud.browserstack.com/wd/hub',
        'webDriverProxy': 'http://uvi.hosting.corp:8080',
        'url': 'https://acc-www.centraalbeheer.nl',
        'capabilities': {
            'browserstack.user': 'myusername',
            'browserstack.key': 'mybrowserstackkey',
            'browserstack.local': true,
            'browserstack.debug': true,
        },
         'multiCapabilities': [{
            'browserName': 'Chrome'
            },{
            'browserName': 'Firefox'
            }]  
          },

    Iframe: {
        require: './helpers/iframe_helper.js'
    }
},

edit: I managed to fixed the first issue, only to run into another.

My thanks in advance for any help/comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions