There are always neat packages in developer communities to help you as long as you can find them. Today my example is grunt-mocha-webdriver. Yes! you get it (from the name): it can help if you use gruntjs, mocha and selenium webdriver in your web application project or testing project.
Getting startedMake sure you want to keep reading if you:
- want to test your web applications
- manage child processes for testing in Gruntfile.js and it's a boring job
- maintain custom test driver, like injecting environmental options into test suites
- want to have options on selenium service providers
Or just read the ****ing source code directly if you're rock star developer and jump into the code section directly.
Note: I'm not providing free test minutes backdoor to saucelabs.com nor browserstack.com...If you ever think about it, please go to their popular free trial page.
Follow the readme file of grunt-mocha-webdriver to pick it up in minutes. Then keep reading.
Check out additional features
#1: I like saucelabs.com...but I dislike creating tunnel (it doesn't work all the time)
You can use the following options to treat saucelabs.com as a normal selenium service provider plus online videos of test session:
When means it will connect to saucelabs.com but no tunnel created. Don't forget exporting your username and access key to environment.
#2 using browserstack.com
Yes, you can, I'm not kidding and it works very well. in the same way as #1, you need to provide the configuration information (no tunnel created):
browserName: "internet explorer",
Then you can enjoy the full list of browser/platform combinations from browserstack.com.
So far, you still need tunnel to test application started at local machine, I didn't have good experience on testing over tunnel yet.
Finally, don't blame me if your Gruntfile.js becomes too long :)