envgene-bdd-tests

Creates and verifies Gherkin/Cucumber BDD tests for the EnvGene environment generator.

8|15|Updated Jan 17, 2025
One-click install
npx skills add https://github.com/Netcracker/qubership-envgene --skill envgene-bdd-tests-netcracker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: envgene-bdd-tests
Source: https://github.com/Netcracker/qubership-envgene/tree/main/.agents/skills/envgene-bdd-tests
Command: npx skills add https://github.com/Netcracker/qubership-envgene --skill envgene-bdd-tests-netcracker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytest, pytest-bdd, pyyaml.

What problem does it solve? Writing consistent BDD tests for the EnvGene project requires mapping use-case documents to feature files, structuring test data, and wiring pytest-bdd runners correctly. This Skill encodes the full workflow and conventions so tests are complete, consistent, and discoverable. ## Core Features & Use Cases - Use-Case to Scenario Mapping: Converts each UC-<PREFIX>-<N> entry in docs/use-cases/ into exactly one Gherkin Scenario with matching titles and grouping comments. - Test Data & Golden References: Defines conventions for per-scenario test data directories, sparse large-file generation, and golden reference comparison with UPDATE_GOLDEN regeneration. - Step Definitions & Runner Wiring: Catalogs reusable shared steps, rules for feature-specific step implementations, and the required test_<feature>.py runner so pytest-bdd discovers scenarios. - Use Case: When adding tests for a new use-case document, follow the 7-step workflow to produce the feature file, test data, step definitions, and runner, then verify coverage with the built-in checklist. ## Quick Start Ask the assistant to create BDD tests for a specific use-case document under docs/use-cases/, for example: generate the feature file, test data, and step definitions for environment-inventory-generation.md.

Frequently Asked Questions about envgene-bdd-tests

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

FAQPage Schema
How do I write Cucumber BDD tests with pytest-bdd?

Write a Gherkin .feature file with one Scenario per use case, implement step definitions using pytest-bdd's given/when/then decorators, and create a test runner module calling scenarios() to wire the feature file. Run tests with pytest against your pytest.ini configuration.

How do I map use-case documentation to Gherkin scenarios?

Map each UC entry's Pre-requisites to Given steps, Trigger parameters to pipeline parameter steps, execution to a When step, and Results to Then assertions covering success/failure, log messages, and file state. Keep scenario titles identical to the UC titles.

Why are my pytest-bdd scenarios not being discovered?

Scenarios are silently skipped when the test_<feature>.py runner file is missing. Create a runner that imports the step modules and calls scenarios('../features/<feature>.feature'), then verify discovery with pytest --collect-only.

How do I handle large test files in Git-based test data?

Never commit large files to the repository. Generate them at runtime using sparse files via seek and write, for example through a builder method like create_mock_sboms(app, count, size_mb) inside a Given step.

Can golden reference comparison handle encrypted credential files?

Files encrypted with non-deterministic schemes like Fernet cannot be compared byte-for-byte. Pass ignore_patterns such as ['Credentials'] to the directory comparison utility to exclude them from golden reference checks.