AI-powered Test Case & Cucumber Feature File Generator for the OSS/Telecom domain.
Built with Python + Streamlit + Claude API (claude-sonnet-4-20250514).
OSS AI Test Generator converts Jira user stories and API specifications (OpenAPI / Postman) into structured test cases and Cucumber .feature files — automatically, with full traceability back to acceptance criteria.
- Jira → Feature File — Fetch a Jira story, generate Functional / Negative / Boundary test cases, export a
.featurefile. - OpenAPI / Postman → Feature File — Upload an API spec JSON, pick endpoints, generate per-endpoint test suites.
- Demo mode — A built-in OSS Fault Management demo runs without any API key, letting you explore the output immediately.
- Download Center — Download individual
.featurefiles or all of them bundled in a.zip. - Scenario Outlines — Data-driven scenarios with
Examples:tables are generated automatically for parameterised cases. - Traceability — Every test case includes a
source_accomment pointing to the exact acceptance-criterion text it was derived from, and inferred cases are flagged with a warning.
| Domain | Examples |
|---|---|
| Fault Management | Alarm lifecycle, correlation, suppression, NBI forwarding |
| Performance Management | KPI/KQI collection, threshold breaches, PMRP jobs |
| Network Inventory | NE lifecycle, topology discovery, reconciliation |
| Service Provisioning | Order fulfilment, service activation, rollback |
| Configuration Management | NETCONF/YANG, CM backup/restore |
| Network Topology | Link discovery, adjacency |
| Requirement | Version |
|---|---|
| Python | 3.10 or later |
| pip | any recent version |
You will also need:
- Anthropic API key — get one at console.anthropic.com (required for live generation; not needed for demo mode).
- Jira API token — required only for the Jira tab (not needed for API spec or demo tabs).
# 1. Clone the repository
git clone <repo-url>
cd oss-test-case-generator
# 2. (Recommended) Create a virtual environment
python -m venv .venv
source .venv/bin/activate # macOS / Linux
.venv\Scripts\activate # Windows
# 3. Install dependencies
pip install -r requirements.txtstreamlit>=1.32.0
anthropic>=0.25.0
requests>=2.31.0
pandas>=2.0.0
streamlit run app.pyThe app opens in your browser at http://localhost:8501.
-
Sidebar — Configuration
- Enter your Claude API Key.
- Enter your Jira Base URL (e.g.
https://yourorg.atlassian.net), Jira Email, and Jira API Token. - Choose one or more OSS Sub-domains.
- Toggle generation options: auto-tags, Background block, Scenario Outlines.
-
Enter a Jira Issue Key (e.g.
OSS-4721) and click Fetch Story. -
Review the fetched story content and acceptance criteria.
-
Click Generate with Claude — the AI analyses the story and produces test cases.
-
Review the generated test cases (expandable cards with steps, tags, test data, and traceability).
-
Enter a Feature title and click Generate .feature File, then download it.
-
Complete the sidebar configuration (Claude API Key + generation settings).
-
Select the spec format: OpenAPI / Swagger JSON or Postman Collection v2.1.
-
Upload your JSON file.
-
Optionally select specific endpoints; leave blank to process all.
-
Click Generate Test Cases — one test suite per endpoint is produced.
-
Generate and download individual
.featurefiles.
Download all previously generated .feature files in a single .zip archive.
Runs the built-in OSS Fault Management demo without requiring any API key:
- Pre-loaded Jira story: Alarm Notification Service — Real-time alarm forwarding to NBI (
OSS-4721). - 8 pre-built Jira test cases covering AC1–AC7 (Functional, Negative, Boundary).
- Pre-loaded OpenAPI demo spec for
POST /alarmswith 5 test cases. - Click Generate Demo Feature Files to produce downloadable
.featurefiles instantly.
Two sample JSON files are included for testing Tab 2 without a live API:
| File | Description |
|---|---|
demo_alarm_api.json |
OpenAPI spec for the OSS Alarm Management API (POST /alarms) |
demo_jira_story.json |
Exported Jira story JSON for OSS-4721 |
Upload either file in Tab 2 to try the full API spec workflow.
oss-test-case-generator/
├── app.py # Main Streamlit application
├── requirements.txt # Python dependencies
├── demo_alarm_api.json # Sample OpenAPI spec
├── demo_jira_story.json # Sample Jira story export
└── README.md
Instead of entering your API key in the sidebar on every run, you can set it as an environment variable and pre-populate the field:
export ANTHROPIC_API_KEY="sk-ant-..."The app reads sidebar inputs at runtime; environment variable support requires a small code change if you want it fully automated.
Each .feature file follows standard Gherkin syntax:
# Generated by OSS AI Test Generator
# Source: OSS-4721
# OSS Domain: Fault Management
# Generated: 2026-03-02 10:00
# Total Scenarios: 8
@oss-fm @telecom
Feature: Alarm Notification Service - Real-time alarm forwarding to NBI
As an OSS engineer
I want to verify alarm notification service
So that the OSS system operates correctly
Background:
Given the OSS system is up and accessible
And the user is authenticated with valid credentials
And the test network elements are available
@regression @oss-fm @functional @p1
Scenario Outline: [TC_OSS_FM_001] Forward CRITICAL alarm to NBI within SLA
# Preconditions: OSS FM module is running; NBI endpoint is reachable
Given A CRITICAL alarm RRC_SETUP_FAILURE is raised on NE <neId> (<neType>)
When The FM module receives the alarm via SNMP trap
And Record the alarm receipt timestamp T1
Then NBI receives alarm notification within 5 seconds of T1
# Traceability: Derived from AC1: 'system SHALL forward alarm to NBI within 5 seconds'
Examples:
| neId | neType | severity | alarmCode |
| NE-gNB-001 | gNB | CRITICAL | RRC_SETUP_FAILURE |
| NE-eNB-042 | eNB | MAJOR | S1_LINK_FAILURE |
| NE-OLT-007 | OLT | CRITICAL | PON_PORT_DOWN || Problem | Solution |
|---|---|
401 from Jira |
Verify Jira email and API token in the sidebar. |
404 Jira issue not found |
Check the issue key and Jira Base URL. |
| Claude returns no JSON | The API key may be invalid or rate-limited. |
| Empty acceptance criteria | The tool falls back to the story description; add ACs explicitly in Jira. |
| Postman collection not parsed | Ensure the collection is exported as Collection v2.1 format. |
MIT