How can I set the test name for Mocha.js automation tests?

How can I set the test name for Mocha.js automation tests?

Hi Miro!

To set test name for your Mocha.js automation scripts, you need to change the ‘name’ attribute in the capabilites as shown below -

exports.capabilities = {
        'build': 'Mocha-Selenium-Sample', //Build name
        'name': 'Your Test Name', // Test name
        'platform':'Windows 10', // OS name
        'browserName': 'chrome', // Browser name
        'version': 'latest', // Browser version
};

You can also checkout the below GitHub repo to conduct Mocha.js testing.

https://github.com/rshmimondal/Mocha-js-set-testname