TestModeller.io - Gherkin Tutorial

Welcome to the TestModeller.io Gherkin tutorial !

In this tutorial we'll be covering how to get started with TestModeller.io for Gherkin.

This is aimed for first-time users along with users who have an existing cucumber automation framework or gherkin feature files.

A demonstration of Test Modeller for Gherkin / Cucumber Frameworks covered in this tutorial.

1. How it works

TestModeller.io is a browser-based solution that enables users to:

  • Model a system under test as BPMN-style flowcharts.
  • Automatically generate test cases from the model, optimising testing for time and risk.
  • Define test data at the model-level and generate data at the same time as test cases.
  • Define test automation, automatically executing tests generated in The VIP Test Modeller.
  • Analyse test results and manage existing artefacts, with visual dashboards and a file management system that introduces traceability between test assets.

This quick start guide provides an overview for new users to get started with creating gherkin feature files for consumption in a Cucumber based automation framework.

For the Gherkin language this means creating models which automatically generate gherkin feature files code which can be directly plugged into your Cucumber framework.

TestModeller.io a modelling tool which creates the perfect set of tests into a wide array of test case management systems, and automation frameworks. Along with overlaying the right test data to support your testing.

This section is by no means comprehensive and intended as a quick start guide. If you wish to learn more about modelling we recommend you review our knowledge base along with our video tutorials for a comprehensive guide to creating models and test automation.

2. Prerequisites

Install Prerequisites

Here we'll be installing all the prerequisites you need to get started with TestModeller.io.

  1. Create a free TestModeller.io account
3. Import Feature File (Optional)

Import Feature File

Here we'll be importing an existing gherkin feature file to automatically create a model in TestModeller.io.

4. Model Gherkin

Build a Model

Start creating an gherkin model of the system under test.

If you'd like to learn more about building models we recommend reviewing our knowledge base articles on creating models here.
5. Export Gherkin Feature File

Generate Gherkin

Generate an associated gherkin feature file for your model.

Generate Coverage Focused Tests

Test cases are equivalent to paths through the model of a system under test. They are generated automatically from a model, with or without test data and test automation associated with them. Coverage techniques are also available to generate the smallest set of test cases needed to test given features with a required level of rigour.

  1. To generate test cases, navigate to the Generate tab of the menu and click “Generate”
  2. TestModeller.io will provide status updates as the tests are generated.
  3. To browse the generated tests, click “Tests” in the Generate tab of the menu. This will open the Test Cases side bar, displaying any created tests.
  4. Clicking on a test will highlight the path through a model’s logic which that test reflects.
Test Coverage

The tests generated by TestModeller.io are the optimal set of tests to maximise coverage across the model. You can learn more about test coverage and how to edit coverage settings within TestModeller.io at our knowledge base here.

Export Gherkin Feature File

Once you have created a model with overlaid Given, When, and Then actions along with a test suite containing associated paths, you are ready to create a feature file for your cucumber framework.

  1. Click the export button in the test path side bar.
  2. Select the connector 'Gherkin' from the dialog window and specify a name for the feature file.
  3. Once the job is complete there will be an option to download your generated feature file. If there are any errors these will be present in the error log window.