Plug-in Documentation



The UrbanCode Build Mocha plug-in automates JavaScript testing as part of the build process. Use the plug-in run the Mocha tool, point to the location of Mocha test files and where to return test results.

This plug-in includes one step:

Step palette

To access this plug-in in the palette, click Quality > Unit Testing > Mocha.


The steps in this plug-in run on all supported platforms.


No special steps are required for installation. See Installing plug-ins in UrbanCode.


Version 2

  • Remove the publish step due to being unusable, and add a new property to Run Test step for specifying the Mocha reporter to use when generating test reports.

Version 1

  • Initial release.


Process steps in the Mocha plug-in

Run Test

Run unit tests.

Input properties for the Run Test step
Name Type Description Required
Mocha Home String The Mocha bin directory where the Mocha application is located. Specify a value for
this property, if not listed in the PATH environment variable.
Path of Result File String The path where the result file is to be placed. Yes
Reporter String The reporter to use for generating the Mocha test report. Yes
Test Directory String The directory that contains the test files. Yes