Created
May 8, 2014 22:23
-
-
Save bregenspan/b62c138cdec7042eaa2e to your computer and use it in GitHub Desktop.
Testing a Circle CI build with Sauce Labs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Customize the test machine | |
machine: | |
environment: | |
SAUCEUSER: [USERNAME HERE] | |
SAUCEKEY: [KEY HERE] | |
dependencies: | |
post: | |
- wget https://d2nkw87yt5k0to.cloudfront.net/downloads/sc-latest-linux.tar.gz && tar -xvf sc-latest-linux.tar.gz | |
test: | |
override: | |
# Start Sauce Connect | |
- cd sc-*-linux && ./bin/sc -u ${SAUCEUSER} -k ${SAUCEKEY}: | |
background: true | |
# Start whatever server you need here | |
# - [SOME COMMAND HERE]: | |
# background: true | |
# Run tests, after waiting for server to start | |
- test_wrapper.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Waiting for local test server to become available..." | |
curl http://[YOUR_LOCAL_SERVER_HOSTNAME] > /dev/null 2>&1 | |
while [ $? -ne 0 ]; do | |
sleep 3 | |
curl [http://YOUR_LOCAL_SERVER_HOSTNAME] > /dev/null 2>&1 | |
done | |
echo "Waiting 10 seconds..." | |
sleep 10 | |
echo "Running tests..." | |
grunt selenium |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you specify which browser sauce labs will use? Normally I specify it using the selenium driver. What if selenium doesnt support a browser that sauce does? Very confused.