gherkin-karma-example

Example of integrating Gherkin into karma through the help of yadda.

Usage no npm install needed!

<script type="module">
  import gherkinKarmaExample from 'https://cdn.skypack.dev/gherkin-karma-example';
</script>

README

1. Introduction

This package is an example of an workflow for automated unit testing in JavaScript. It's goal is to support developers in improving the quality of their software.

2. Motive

Recurring problems:

Sometimes programmers are faced with one ore more of the following points:

  • Lack in motivation and time for:
    • documentation
    • unit tests
  • Costumer requirements are:
    • alternating fast
    • unclarified
    • being misunderstood

Solution:

Get everything together in one automated workflow by combining the styles of TDD and BDD.

It all starts with writing software requirements in a simple language restricted to just some keywords. Besides functioning as a fundament for documentation, they can be used as a source for automatic generated unit tests. This way the written requirements can be understood by everybody, one could even write them together with costumers or none developer co-workers. Furthermore a generated test not only saves time, it guarantees that the specified statements of the unit tests are based strictly on your requirements. As a result you minimize the risk of misconceptions. If there's a change of requirements the portrayed process chain can even be used to update the generated unit tests immediately. Since only one source is used as a fundament it's easy to keep everything consistently.

Implemented with a composition of modern frameworks this package tries to be a useful approach of the portrayed procedure.

3. Install

npm install gherkin-karma-example

4. Execute

npm test

5. Composition

Most important parts are (order is based on process chain):

infographic

6. Todo

  • Handling of gherkin feature context
  • Yeoman Integration
  • Include German words for Gherkin
  • ES6 Support
  • Include karma module CodeFlower
  • Include karma module SonarQube

Maintainer

kaasbaardje

License

MIT