Test suite
Last updated
Was this helpful?
Last updated
Was this helpful?
The LetsFlow test-suite allows you to validate LetsFlow scenarios (defined in YAML) through end-to-end tests using Cucumber. It ensures that:
Scenarios are correctly written and valid (schema-compliant).
The LetsFlow engine interprets and executes them as expected.
Tests simulate real-world actor inputs and decisions in a controlled way.
This helps scenario authors verify workflows behave correctly across different conditions without needing to deploy or manually test them.
Copy the cucumber configuration from the test suite and create directories from the scenario and test files.
Edit package.json
and add the test:workflows
script.
Run the tests
Gherkin provides a human-readable way to describe the steps and outcomes of your workflows using the Given-When-Then structure.
Scenarios can be loaded from YAML files in the scenarios
directory. The tests are loaded from the .feature
files in the features
directory.
The test suite provides a number of Given
, When
, and Then
steps that allow you to set up a new process, step through it, and assert the outcome.
Given
steps in gherkin are used to describe the initial context of the system. In the LetsFlow test suite, the Given
steps are used to define the processes and introduce the actors.
When
steps are used to describe an action. This can be a actor interacting with the system, or it can be an event triggered by another system.
Then
steps are used to describe an expected outcome or result. They perform an assertion.
Use npm, yarn, or pnpm to create a new project. Install and the LetsFlow test suite.
Workflow tests are written in , a simple language for describing behavior in a readable way.