Editor: Check out this guest blog post by Igor Ribeiro Lima on how use the commandline to perform cross browser testing.
To run these tests cross platform, you only need to execute a few commands, as described below:
1. First, create your SauceLabs account
2. Make sure Sauce credentials are set as environment variables:
`SAUCE_USERNAME` – your SauceLabs username
`SAUCE_ACCESS_KEY` – your SauceLabs API/Access key
3. Now, follow the script below:
npm install -g testem saucie git clone email@example.com:airportyh/testem.git cd testem/ git checkout tags/v0.7.1 cd examples/saucelabs/
Keep that first terminal open, then open a second terminal and use the script below:
cd testem/examples/saucelabs/ testem --port 8080
Go back to the first terminal and type:
saucie --browserNameSL="internet explorer" --versionSL="7.0" --platformSL="Windows XP" saucie --browserNameSL="iphone" --versionSL="8.1" --platformSL="OS X 10.10" --deviceNameSL="iPad Simulator" --deviceOrientationSL="portrait" saucie --browserNameSL="android" --versionSL="4.1" --platformSL="Linux" --deviceNameSL="Motorola Atrix HD Emulator" --deviceOrientationSL="portrait"
- All platforms are listed here. Want to know what the values for the
platformSLparams are? Check them here.
- If you’d like to use the default configuration, just type
testem ci --port 8080
saucie --helpto get a help.
Watch a demo
Click on the screenshot below to watch a command line demo of Saucie in action!
As you can see, with just a few commands we were able to test across cross browsers. Now, let’s go to SauceLabs and check the results, including the mobile ones such as iOS and Android:
Saucie will soon integrate other platforms like BrowserStack. The project also recently got various improvements from johanneswuerbach. He made several changes to use Saucie in ember-cli-sauce, which is now used by htmlbars, the rendering engine used by emberjs.
Feel free to file issue and send pull requests and let’s become Saucie even better. Thanks!