test-generation

Generate Cucumber step definitions and Vitest unit tests from Gherkin scenarios.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/EmeaAppGbb/spec2cloud-microhack-greenfield --skill test-generation-emeaappgbb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-generation
Source: https://github.com/EmeaAppGbb/spec2cloud-microhack-greenfield/tree/main/.github/skills/test-generation
Command: npx skills add https://github.com/EmeaAppGbb/spec2cloud-microhack-greenfield --skill test-generation-emeaappgbb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires cucumber, vitest, playwright, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the generation of BDD test code from Gherkin scenarios, including Cucumber step definitions and Vitest unit tests, streamlining the test development process.

Core Features & Use Cases

  • Test Generation: Automatically creates Cucumber step definitions and Vitest unit tests from Gherkin scenarios.
  • Red Baseline: Generates a red baseline where all tests compile and fail, ensuring a comprehensive test suite before implementation.
  • Green Baseline: Supports generation of tests that pass against existing code for brownfield applications.
  • Use Case: For a new feature, use this Skill to generate test code that will later be implemented by developers, ensuring test coverage from the start.

Quick Start

Run the test-generation skill on the 'features' directory to generate tests for all features.

Frequently Asked Questions about test-generation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Cucumber step definitions from Gherkin scenarios automatically?

Automating BDD test generation from Gherkin scenarios creates Cucumber step definitions and Vitest unit tests directly from feature files. You provide the Gherkin scenarios and Page Object Models for UI interactions to receive ready-to-run test code.

What is a red baseline in BDD test generation and when do I need it?

A red baseline in BDD test generation is an initial test suite where all tests compile but fail. You need it for greenfield applications to establish comprehensive test coverage before feature implementation begins.

Can I generate Vitest unit tests for existing brownfield applications?

Yes, you can generate Vitest unit tests for existing brownfield applications. The test generation supports creating a green baseline, producing tests that pass against your current codebase to validate existing functionality.

Do I need Playwright Page Object Models to generate BDD tests with Cucumber and Vitest?

Yes, you need Page Object Models for UI interactions when generating BDD tests with Cucumber and Vitest. Playwright is included as a dependency to handle browser automation and UI interaction validation.

How do I run test generation across an entire features directory?

To run test generation across an entire features directory, execute the test-generation skill targeting that directory. It scans all Gherkin scenarios inside and automatically generates the corresponding Cucumber step definitions and Vitest unit tests.