gwen
Specifications Driven Automation
Declare features
Write feature specs to describe how scenarios should behave.
File: gwen/features/todo.feature
Feature: Add todo items
Scenario: Create todo list
Given a new todo list
When the following items are added
| Item |
| Get the milk |
| Walk the dog |
Then the list will contain 2 items
Compose meta
Write meta specs to describe how steps will execute.
File: gwen/features/todo.meta
Feature: Todo Meta
@Context
@StepDef
Scenario: a new todo list
Given my todo list can be located by css ".todo-list"
When I navigate to "https://todomvc.com/examples/react/dist"
Then the page title should contain "TodoMVC"
And my todo list should be empty
@Action
@DataTable
@ForEach
@StepDef
Scenario: the following items are added
Given the todo field can be located by class "new-todo"
When I enter Item in the todo field
Then my todo list should contain Item
@Assertion
@StepDef
Scenario: the list will contain <expected-count> items
Given the item count can be located by css ".todo-count"
Then the item count should contain "$<expected-count>"
And my todo list should be displayed
Launch Gwen
Launch Gwen to automate execution.
- Yarn
- npm
- pnpm
Quick setup (see getting started)Execute one feature specExecute all feature specs in a directory
yarn add -D @gweninterpreter/gwen-web
yarn gwen init
yarn gwen -b gwen/features/todo.feature
yarn gwen -b gwen/features
Quick setup (see getting started)Execute one feature specExecute all feature specs in a directory
npm i --save-dev @gweninterpreter/gwen-web
npm run gwen init
npm run gwen -- -b gwen/features/todo.feature
npm run gwen -- -b gwen/features
Quick setup (see getting started)Execute one feature specExecute all feature specs in a directory
pnpm add -D @gweninterpreter/gwen-web
pnpm gwen init
pnpm gwen -b gwen/features/todo.feature
pnpm gwen -b gwen/features