NodeJS with Intern
With Intern you can run Javascript unit tests on TestingBot's browser grid.
Run your javascript test on all our browsers in the cloud.
Installing the example
Make sure you have installed git
and NodeJS
.
Then proceed to clone our intern_example with the follow commands:
git clone https://github.com/testingbot/intern_example.git
cd intern_example
Once that's installed, please run the follow command to set up the example:
npm install intern --save-dev
Run Intern test on TestingBot
In the tests/intern.js
file you'll find environment variables where you can indicate on which browsers you want your test to run on via TestingBot.
To actually run the test on TestingBot, we first need to specify the TestingBot key
and secret
in tests/intern.js
. You need to specify these in the webdriver
and tunnelOptions
variables.
apiKey: "YOUR_KEY",
apiSecret: "YOUR_SECRET"
Now you're ready to run the test on TestingBot.
To start the test, run the following command:
./node_modules/.bin/intern-runner config=tests/intern
This will download and start our TestingBot Tunnel, run your test and report back the result to TestingBot.