Skip to main content

Interactive

REPL

Since v1.0.0

Gwen will open the REPL console when it finishes executing features unless batch mode is enabled.

Debugging

Breakpoints

Since v3.2.0

Breakpoints can be added to any feature or meta steps by prefixing their expressions with @Breakpoint . These are ignored unless debugging is explicitly enabled with the -d|--debug CLI option.

Example

Breakpoint in feature file

File: 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 @Breakpoint the list will contain 2 items
info

To activate breakpoints, launch Gwen in debug mode by specifying the -d|--debug CLI option.

When a breakpoint on a step is encountered and debugging is enabled, Gwen will pause execution, open the REPL, and prompt the user to continue execution from that step or to quit (or to perform other REPL operations).

Sample breakpoint prompt in REPL
Feature: Add todo items

Scenario: Create todo list
Given a new todo list [6s 344ms] Passed
When the following items are added
| Item |
| Get the milk |
| Walk the dog | [2s 200ms] Passed

Paused at features/todo.feature:9
Then @Breakpoint the list will contain 2 items
Enter c to continue or q to quit (or type help for more options)..

gwen@Breakpoint> _