Skip to content

Unable to run tests on saucelabs #1521

Closed

Description

What are you trying to achieve?

Testing on saucelabs

What do you get instead?

Could not load helper WebDriver from module './helper/WebDriver':

Provide console output if related. Use --verbose mode for more details.

npm run test:sauce

> codecept-playground@1.0.0 test:sauce /Users/n0s00jx/codebase/personal/codecept-playground
> codeceptjs run --config codecept.sauce.js --steps

2019-02-25T10:09:32.531Z DEBUG wdio-config: @wdio/sync not found, running tests asynchronous

Could not load helper WebDriver from module './helper/WebDriver':

        WebDriver requires at url and browser to be set.
        Check your codeceptjs config file to ensure these are set properly
          {
            "helpers": {
              "WebDriver": {
                "url": "YOUR_HOST"
                "browser": "YOUR_PREFERRED_TESTING_BROWSER"
              }
            }
          }
      

Error: 
    at createHelpers (/Users/n0s00jx/codebase/personal/codecept-playground/node_modules/codeceptjs/lib/container.js:152:13)
    at Function.create (/Users/n0s00jx/codebase/personal/codecept-playground/node_modules/codeceptjs/lib/container.js:32:25)
    at Codecept.init (/Users/n0s00jx/codebase/personal/codecept-playground/node_modules/codeceptjs/lib/codecept.js:55:15)
    at Command.module.exports (/Users/n0s00jx/codebase/personal/codecept-playground/node_modules/codeceptjs/lib/command/run.js:35:14)
    at Command.listener (/Users/n0s00jx/codebase/personal/codecept-playground/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:182:13)
    at Command.parseArgs (/Users/n0s00jx/codebase/personal/codecept-playground/node_modules/commander/index.js:654:12)
    at Command.parse (/Users/n0s00jx/codebase/personal/codecept-playground/node_modules/commander/index.js:474:21)
    at Object.<anonymous> (/Users/n0s00jx/codebase/personal/codecept-playground/node_modules/codeceptjs/bin/codecept.js:142:9)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! codecept-playground@1.0.0 test:sauce: `codeceptjs run --config codecept.sauce.js --steps`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the codecept-playground@1.0.0 test:sauce script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/n0s00jx/.npm/_logs/2019-02-25T10_09_32_673Z-debug.log

Provide test source code if related

// paste test

Details

  • CodeceptJS version: 2.0.4
  • NodeJS Version: 9
  • Operating System: MacOS
  • Protractor || WebDriverIO || Nightmare version (if related)
  • Configuration file:
exports.config = {
  tests: "./*_test.js",
  output: "./output",
  helpers: {
    WebDriver: {
      url: "http://localhost",
      user: "key",
      key: "3f110cac-0e71-4a81-ad84-df6064481863",
      desiredCapabilities: {
        browserName: "chrome"

        // only set this if you're using BrowserStackLocal to test a local domain
        // "browserstack.local": true,

        // set this option to tell browserstack to provide addition debugging info
        // "browserstack.debug": true,
      }
    }
  },
  include: {
    I: "./steps_file.js"
  },
  name: "codecept-playground"
};

Activity

  1. elukoyanov commented on Feb 25, 2019

    @elukoyanov
    Contributor

    @nilanjansiromani

    You did not set browser field in helpers.WebDriver, see error description.

    helpers: {
        WebDriver: {
          url: "http://localhost",
          user: "key",
          key: "3f110cac-0e71-4a81-ad84-df6064481863",
          browser: "chrome"
          desiredCapabilities: {
          }
        }
      },
    

    And try remote test launch with Codeceptjs 2.0.6
    One bug was recently fixed #1506

  2. ghost closed this as completedon Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions