Mocha Website

How does it work?

Simply by sending Mocha test results to Testuff url:

https://serviceX.testuff.com/client_api/v0/testcase/[TOKEN]?tool=mocha&branch=[BRANCH_ID]

Reporting to Testuff is protected Via HTTP POST over SSL, and your Testuff user TOKEN is used for identification.

* You’ll find your Testuff server number under the Settings->Company Details, and your user Token under the User settings.
The branch ID can be found in the Project settings->Branches tab.

Run Mocha from the command line

$ mocha –reporter=json >result.json

Send results to Testuff

$ curl -k -X POST -F “file=@result.json” https://serviceX.testuff.com/client_api/v0/testcase/[TOKEN]?tool=mocha&branch=[BRANCH_ID]

Sample of tests (test.js)

Copy to Clipboard

JSON output for these tests

Copy to Clipboard