NodeJS with Intern
Intern has not seen significant releases since 2019. For new JavaScript end-to-end testing projects we recommend WebdriverIO or Nightwatch.
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.json config you'll find tunnel and environments entries 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 point the WebDriver tunnel at the TestingBot Selenium hub and pass the TestingBot key and secret. In tests/intern.json:
{
"tunnel": "testingbot",
"tunnelOptions": {
"username": "YOUR_KEY",
"accessKey": "YOUR_SECRET"
},
"environments": [
{ "browserName": "chrome", "browserVersion": "latest", "platformName": "WIN11" }
]
}
Now you're ready to run the test on TestingBot. In Intern 4+, the runner is invoked as intern (the old intern-runner binary was removed). To start the test, run:
./node_modules/.bin/intern config=@testingbot
This will download and start our TestingBot Tunnel, run your test and report back the result to TestingBot.