Gherkin + Mocha

A friend just published (here) an integration for Mocha using Gherkin language (akin to what Martin Fowler described as a “Business Readable, Domain Specific Language”).

Why is it needed? Here’s a brief sample of how mocha runs normally:


With Mocha-Gherkin-UI you’ll have an output like this one:

Mocha and Gherkin

In brief, what you gain is the ability to describe a test by providing a broader context and add tags which have some obvious gains such as being able to use issue tracking tools API to automate the workflow of test executions,  coverage, and whatnot. Also, Gherkin support adds the possibility to define a steps-based flow, which, in some circumstances when the test flow is complex it’s highly desired to be able to do that.

Andrés will be glad to receive feedback from anyone interested in this, so feel free to give it a try and let him know your thoughts.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s