Features

TestCafe

TestCafe is a NodeJS framework to do automate end-to-end web testing. You can write tests in either Javascript or TypeScript and is very easy to install and use.


To get started, make sure you have:

  • NodeJS installed
  • Java (8 or higher) installed

Install TestCafe


To install TestCafe and the TestingBot plugin, please use this command:

npm install -g testcafe testcafe-browser-provider-testingbot

Once this is installed, you can start using TestCafe to run tests on TestingBot.

Configure the TestCafe + TestingBot plugin

Please add these 2 environment variables to authenticate to our browser grid:

export TB_KEY=YOUR-TESTINGBOT-KEY
export TB_SECRET=YOUR-TESTINGBOT-SECRET

These two environment variables are required, however the plugin can be further configured with these environment variables as well:

  • TB_TEST_NAME: the text that will be displayed as Test Name in the dashboard.
  • TB_BUILD: you can add the tests as part of a build.
  • SELENIUM_CAPABILITIES: path to a file which contains a JSON formatted object with the capabilities you want to use. By default it will look for capabilities.json.
  • TB_SCREEN_RESOLUTION: set the VMs to a specific screen resolution.

Test Example

Please see this sample test, which you can use to run a test on our browser grid:

import { Selector } from 'testcafe';

fixture `Getting Started`
    .page `http://devexpress.github.io/testcafe/example`;

test('My first test', async t => {
    await t
        .typeText('#developer-name', 'John Smith')
        .click('#submit-button')

        // Use the assertion to check if the actual header text is equal to the expected one
        .expect(Selector('#article-header').innerText).eql('Thank you, John Smith!');
});

Now you can run this test on TestingBot:

testcafe "testingbot:chrome@83:WIN10" 'example.js'

TestCafe will start a TestingBot Tunnel, then start a new Windows 10 VM on TestingBot with Chrome 83 and run the test.
You will see a video recording of the test in the member dashboard, together with screenshots and logs.


Configuring capabilities

With our TestCafe plugin, you can use a file called capabilities.json where you can specify a JSON object with capabilities for each browser you want to use.


1. Select a Platform
2. Select a Browser


Other Options

We offer many other test options, for example: disable video recording, specifying a custom Firefox Profile, loading Chrome/Firefox/Safari extensions, running an executable before your test starts, uploading files, ...
See our list of test options for a full list of options to customize your tests.


You can use these options in the capabilities.json file.

Parallel Testing

Parallel Testing means running the same test, or multiple tests, simultaneously. This greatly reduces your total testing time.

You can run the same tests on all different browser configurations or run different tests all on the same browser configuration.
TestingBot has a large grid of machines and browsers, which means you can use our service to do efficient parallel testing. It is one of the key features we provide to greatly cut down on your total testing time.


Queueing

Every plan we provide comes with a limit of concurrent VMs (how many tests you can run in parallel).
For example: if you have a plan with 5 concurrent VMs, it is possible to start more tests. TestingBot will queue the additional tests and run the tests as soon as slots become available.


To run multiple tests simultaneously, you can specify multiple browsers, like this:

testcafe "testingbot:chrome@83:WIN10","testingbot:firefox@79:CATALINA" 'path/to/test/file.js'

More NodeJS examples:

  • WebdriverIO

    Webdriver/Selenium 2.0 javascript bindings for NodeJS.

  • Protractor

    Protractor is an end-to-end test framework for AngularJS applications. Protractor is a NodeJS program built on top of WebDriverJS.

  • Soda

    Selenium Node Adapter. A light-weight Selenium RC client for NodeJS.

  • Nightwatch

    Nightwatch.js is an automated testing framework written in NodeJS.

  • CodeceptJS

    CodeceptJS is an end-to-end testing framework which supports Selenium, Appium, Playwright, Puppeteer and more.

  • WD.js

    WD.js is a NodeJS client for WebDriver/Selenium.