spamguy
spamguy

Reputation: 1566

CircleCI/Sauce Labs proxy works but does not run Grunt task

I am trying to integrate with Sauce Labs to run my project's Protractor tests, using CircleCI's guide as a basis. The tests are wrapped in a Grunt task, which runs flawlessly on my machine:

grunt.registerTask('test:protractor', [
    'ngconstant:dev',
    'modernizr:prod',
    'sass',
    'protractor'
]);

This is my circle.yml file:

dependencies:
  pre:
    - sudo apt-get update; sudo apt-get install ruby-sass
    - npm install -g bower
    - bower install
  post:
    - wget https://saucelabs.com/downloads/sc-latest-linux.tar.gz
    - tar -xzf sc-latest-linux.tar.gz

test:
  override:
    - cd sc-*-linux && ./bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --readyfile ~/sauce_is_ready:
        background: true
    # Wait for tunnel to be ready
    - while [ ! -e ~/sauce_is_ready ]; do sleep 1; done
    - grunt test:protractor
        background: true
  post:
    - killall --wait sc  # wait for Sauce Connect to close the tunnel

The Sauce Connect proxy clearly works according to build output:

30 May 18:18:46 - Started scproxy on port 35557.
30 May 18:18:46 - Please wait for 'you may start your tests' to start your tests.
30 May 18:19:03 - Provisioned tunnel:4b38b707d2174ebf9714f05cd8c06f79
30 May 18:19:03 - Using no proxy for connecting to tunnel VM.
30 May 18:19:03 - Starting Selenium listener...
30 May 18:19:03 - Establishing secure TLS connection to tunnel...
30 May 18:19:03 - Selenium listener started on port 4445.
30 May 18:19:04 - Sauce Connect is up, you may start your tests.

But at that point, it totally stalls. No effort to call grunt test:protractor, no activity whatsoever. After 10 minutes I killed the build.

What am I missing from this configuration to run Protractor tests through the Sauce Labs proxy?

Upvotes: 0

Views: 77

Answers (1)

Sam Quinn
Sam Quinn

Reputation: 3871

Maybe you forgot to install grunt

dependencies:
  pre:
    - npm install -g grunt

Upvotes: 0

Related Questions