How ritikrikm/generator works
Purpose and entry point
This is an offline Python desktop utility that converts Gherkin .feature specifications into Excel test-case workbooks. Its executable entry point is feature_to_excel.py; users run it locally, choose an input feature file and output .xlsx location, then generate the workbook.
Conversion engine and UI boundary
feature_to_excel.py contains the application’s primary control flow: desktop file selection, feature-text parsing, test-case expansion, and workbook output. The GUI is a local interaction boundary; no server, browser, API, or AI service is involved.
• feature_to_excel.py
• requirements.txt
Feature file as the source contract
Gherkin feature files are the input domain model. Scenarios define reusable test context and steps, while supported fields and example-table columns supply the values that become Excel fields. The full supported mapping contract is documented separately and demonstrated by a canonical template.
• FEATURE_FIELD_TO_EXCEL_MAPPING.md
• feature_to_excel_mapping_template.feature
• feature_to_excel_project_template.feature
Scenario-outline expansion
The defining transformation rule is row expansion: every data row in an Examples table produces one output Excel test-case row. This makes Examples tables the primary cardinality boundary between feature specifications and workbook records. Multiple Examples/data combinations are represented in the included validation fixture.
• test_multiple_examples.feature
• feature_to_excel.py
Excel workbook generation
The output adapter creates an .xlsx workbook with fixed test-management-oriented columns, including identification, labels, language, summary, description, actions, expected results, data, assessment metadata, and repository path. openpyxl is the material external runtime dependency used for Excel serialization.
• feature_to_excel.py
• requirements.txt
Input examples and usage patterns
The repository includes representative feature inputs for login, retail opportunity/home-notification workflows, screenshot visibility, and image-derived component cases. These are operational samples for exercising parser behavior and shaping generated test cases, rather than separate application modules.
• sample_login.feature
• retail_home_notification_sample.feature
• retailrb_opportunity_components_from_images.feature
Deployment model
The tool is distributed as source and executes directly under Python. It is intentionally local/offline: input is filesystem-based .feature text, output is filesystem-based Excel, and its only declared package dependency is openpyxl.
• README.md
• feature_to_excel.py
• requirements.txt
Main entry points: feature_to_excel.py Feature parser · feature_to_excel_mapping_template.feature Mapping template · README.md Usage guide · FEATURE_FIELD_TO_EXCEL_MAPPING.md Field mapping contract
Components 14
Local Converter
Offline Python desktop application.
- Python entry point · Coordinates selection, conversion, and export.
feature_to_excel.py - File selection UI · Chooses source feature and destination workbook paths.
feature_to_excel.py - Feature parser · Reads scenarios, steps, supported fields, and Examples tables.
feature_to_excel.py - Scenario expansion · Creates one test-case record per Examples data row.
feature_to_excel.py - Workbook writer · Writes fixed test-management columns to XLSX.
feature_to_excel.py - Usage guide · Describes local source distribution and execution.
README.md
Feature Contracts
Gherkin mapping documentation and templates.
- Field mapping contract · Defines supported feature-to-Excel field mapping.
FEATURE_FIELD_TO_EXCEL_MAPPING.md - Mapping template · Canonical supported-field example.
feature_to_excel_mapping_template.feature - Project template · Project-oriented feature example.
feature_to_excel_project_template.feature - Multiple Examples fixture · Demonstrates multiple Examples/data combinations.
test_multiple_examples.feature - Operational samples · Representative login, retail, and image-derived cases.
sample_login.feature
Filesystem I/O
Local input and output boundaries.
- Input .feature file · Filesystem feature specification selected by the user.
- Output .xlsx workbook · Generated local test-case workbook.
- openpyxl · Serializes workbook output.
requirements.txt
Connections 14
- Python entry point → File selection UI: opens
- File selection UI → Input .feature file: selects
- Input .feature file → Feature parser: reads
- Python entry point → Feature parser: invokes
- Feature parser → Scenario expansion: scenarios and Examples
- Scenario expansion → Workbook writer: test-case records
- Workbook writer → openpyxl: uses
- Workbook writer → Output .xlsx workbook: writes
- Field mapping contract → Mapping template: documented by
- Mapping template → Feature parser: defines supported input
- Project template → Feature parser: example input
- Multiple Examples fixture → Scenario expansion: validates row expansion
- Operational samples → Feature parser: exercise input behavior
- Usage guide → Python entry point: runs