Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including mtest with all npm packages installed. Try it out:

mtest lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("mtest/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

mtest v0.0.5

Multibrowser test environment


Multiplatform / Browser testing via node.js servers to communicate over http and open browser sequentially.


npm install mtest -g

In some Linux distrubutions sudo maybe neccessery for the -g flag.


MTest uses mtest.json for configuration:

  "page": "http://{{ip/hostname}}:{{port}}",
  "ip": "{{ip of the machine runnig the runner}}",
  "port": 4001,
  "cluster": {
    "{{remote ip}}": ["{{browser}}","{{browser}}",...]


MTest comes with two executables:

  • mtest-runner This is responsible for calling remote machines. This process will exit with 0 for sucess or 1 for failure.
  • mtest-server This is the executable to be run on the servers

Running Tests

When the page opens in the browser it's expected to run the tests and send the results to (POST) http://localhost:400/report with the following json:

{ "failed": #, "passed": #, "skipped": #, "pending": #, "count": #}

Where the # are the counts.

After this request the mtest-server closes the current and opens the next browser in the queue or sends reports to the runner if no browsers are left.

If there is even one failed step in any of the reports the test is considered failed and the mtest-runner will exit with code 1.

IE setup

For IE you will need to add the hostname/ip of the server hosting the test page to your local networks, and maybe lower security in order for the XHR request to reach localhost.

Supported Browsers / Platforms

  • linux: chrome / firefox
  • windows: chrome / firefox / ie
  • mac: chrome / firefox / safari

More browsers will be added in the future.

Currenty the values for the app paths are hard wired, there will be configuration for this in the future

Example Scenario


  "page": "",
  "ip": "",
  "port": 4001,
  "cluster": {
    "REMOTE1-ip": ["firefox","chrome","safari"],
    "REMOTE2-ip": ["firefox","chrome","ie"]
  • Start mtest-server on REMOTE 1
  • Start mtest-server on REMOTE 2
  • Start mtest-runner on
  • REMOTE 1 opens firefox with url... sends results to localhost:4000
  • REMOTE 1 opens chrome with url ... sends results to localhost:4000
  • REMOTE 1 opens safari with url ... sends results to localhost:4000
  • REMOTE 1 sends results to
  • REMOTE 2 opens firefox with url ... sends results to localhost:4000
  • REMOTE 2 opens chrome with url ... sends results to localhost:4000
  • REMOTE 2 opens ie with url ... sends results to localhost:4000
  • REMOTE 2 sends results to
  • mtest-runner exits on


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free