-1

what i want:

run dalekjs-tests on saucelabs with grunt

what i did:

  1. installed grunt-dalek, dalek-driver-sauce

  2. created grunt config:

         dalek: {
           options: {
             driver: ['sauce'],
             browser: ['chrome'],
             advanced: {
               "driver.sauce": {
                 user: "xxx",
                 key: "xxx"
               }
             }
           }
         }
    

what my problem is

Warning: Cannot read property '0' of null Use --force to continue.
BradleyDotNET
  • 57,599
  • 10
  • 90
  • 109
hereandnow78
  • 12,940
  • 8
  • 39
  • 48
  • Does it work without grunt, using the default dalek cmd client? If that works, I will check if the configuration reader messes things up when reading from grunt. (Another idea could be to set up a Dalekfile like in the sauce example & have grunt-dalek use its configuration) – Sebastian Golasch Jun 27 '14 at 09:34
  • don't know if you read my answer. treat this comment as a ping – hereandnow78 Jul 22 '14 at 09:37

1 Answers1

2

finally i had some time to dig deeper into this. the error came from dalek-driver-sauce.

Function _verfiyBrowserConfig inside browser.js caused the problem.

var browser = browsers[0][browserName] || null;

in my config i was missing the browsers property.

the dalek-driver-sauce docs are kind of misleading there:

if you would like to have a more control over the browser/OS combinations that are available, you are able to configure you custom combinations

the browsers config inside advanced-config is mandatory!

a final working grunt-config looked like this:

dalek: {
  options: {
    driver: ['sauce'],
    advanced: {
      "driver.sauce": {
        user: "xxx",
        key: "xxx"
      },
      browsers: [{
        chrome: {
          "platform": "OS X 10.6",
          "actAs": "chrome",
          "version": 27
        }
      }]
    }
  },
  mytest: ['test.js']
}
hereandnow78
  • 12,940
  • 8
  • 39
  • 48