Functional Test Generation
RoostGPT generates functional tests from your business requirements. Given a Jira user story or Azure DevOps work item, it produces structured test scenarios, Gherkin feature files, and an API specification — all as foundational artifacts for subsequent test phases.
How It Works
- Requirements ingestion — RoostGPT fetches the user story from Jira or Azure DevOps (or you can upload a
.docx/.pdf/.txtfile) - Test scenario generation — The AI analyzes the business requirement and generates comprehensive acceptance test scenarios
- Artifact generation — Three outputs are produced simultaneously:
- Functional Test Scenarios — Structured test cases derived from business requirements
- Gherkin Feature File — BDD scenarios in
.featureformat for use in integration tests - API Specification — OpenAPI spec defining the service contracts implied by the requirement
- Review & iteration — Review the generated artifacts and request improvements
Three Output Artifacts
The Functional Test phase is the foundation of the RoostGPT testing pyramid. Its outputs are consumed by all downstream test phases:
Jira Story
│
▼
Functional Tests ──────────────────────────┐
│ produces │
├── Gherkin Feature File ──────────── ▼
│ Integration Tests
└── API Specification ────────────────┐
│
API Tests ───┘
Unit Tests (via OpenAPI Generator)
Using the Web UI
- Navigate to Create Test in the RoostGPT web interface
- Set Test Type to Functional
- Select your Business Requirement Source:
- Jira: Enter Base URL, email, API token, and ticket ID (e.g.,
PROJ-1234) - Azure DevOps: Enter org URL, PAT token, and work item ID
- File Upload: Upload a
.docx,.pdf, or.txtfile
- Jira: Enter Base URL, email, API token, and ticket ID (e.g.,
- Configure your AI provider and Git repository
- Click Save then Execute
Using the CLI
TEST_NAME=functional-credit-card
TEST_TYPE=functional
AI_TYPE=bedrock_ai
ROOST_USER_INPUT_TYPE=file
ROOST_USER_INPUT_FILE=$HOME/workspace/functional-test/UserStory.docx
GIT_TYPE=github
# ... git credentials
roostgpt test create -c functional-test.env
A pre-configured example is available in ~/workspace/functional-test/ after installation.
Output
functional_tests/
├── PROJ-1234_test_scenarios.md ← Functional test scenarios
├── PROJ-1234.feature ← Gherkin feature file
└── PROJ-1234.yaml ← API specification (OpenAPI)
AI Provider Recommendations
Functional test generation involves large context (entire user stories + requirement documents). Use a model with a large context window:
- Claude Sonnet 4 (200K–1M context) — ideal for large requirement documents
- GPT-4o (128K context)
- Gemini 2.5 Pro (1M context) — best for very large specs
Token Usage & Cost
Functional tests are the most token-intensive test type:
| Provider | Input Tokens | Output Tokens | Approx Cost |
|---|---|---|---|
| AWS Bedrock (Claude Sonnet 4) | 15K–50K | 10K–20K | $0.20–$0.45 per test |
Next Steps
After generating functional tests, use the output artifacts:
- Unit Tests — Implement code from the API spec, then generate unit tests
- API Tests — Generate API tests from the produced OpenAPI spec
- Integration Tests — Use the Gherkin feature file as input
- Multiple Test Flow — Full guided walkthrough of all four phases