我試圖用醬實驗室整合來運行我的項目的量角器測試,using CircleCI's guide as a basis。測試被包裹在一個咕嚕任務,完美地運行在我的機器上:CircleCI /醬實驗室代理的作品,但不運行咕嚕任務
grunt.registerTask('test:protractor', [
'ngconstant:dev',
'modernizr:prod',
'sass',
'protractor'
]);
這是我circle.yml文件:
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.
但在這一點上,它完全失速。沒有努力調用咕嚕聲測試:量角器,沒有任何活動。 10分鐘後,我殺死了這個構建。
我從配置中錯過了通過Sauce Labs代理運行量角器測試的內容?
什麼是您的量角器的配置是什麼樣子?你有沒有在你的配置中設置你的醬汁實驗室信息? – cnishina
我意識到任務'咕嚕測試:量角器'實際上是一組子任務,其中量角器是最後一個。例如,SASS處理應該有某種輸出,但顯然不是。我從這個問題中刪除了量角器,因爲它並不適用。那麼真正的問題就是Grunt任務無法運行的原因。 – spamguy