Files
requirements-to-gherkin-cli/README.md
7000pctAUTO a54c5258d0
Some checks failed
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
fix: resolve CI type annotation issues
2026-02-02 12:55:59 +00:00

1.4 KiB

Requirements to Gherkin CLI

Convert natural language requirements into Gherkin feature files (Given-When-Then format).

Features

  • Parse natural language requirements from text files
  • Generate Gherkin feature files automatically
  • Support for multiple requirement formats
  • Configurable output directory

Installation

pip install requirements-to-gherkin-cli

Usage

python -m src.main input.txt -o output/

Example

Input:

The system should allow users to login with email and password
As a registered user
I want to be able to log into my account
So that I can access my personalized content

Acceptance Criteria:
1. User can enter email and password
2. System validates credentials
3. On success, user is redirected to dashboard
4. On failure, error message is shown

Output (feature/login.feature):

Feature: User Login
  As a registered user
  I want to be able to log into my account
  So that I can access my personalized content

  Scenario: Successful login
    Given the user is on the login page
    When the user enters valid email and password
    Then the user should be redirected to the dashboard

  Scenario: Failed login
    Given the user is on the login page
    When the user enters invalid credentials
    Then an error message should be displayed

Configuration

Create a config.yaml file:

output_directory: features/
template: custom.gherkin.j2

License

MIT