Skip to main content

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

  1. Requirements ingestion — RoostGPT fetches the user story from Jira or Azure DevOps (or you can upload a .docx/.pdf/.txt file)
  2. Test scenario generation — The AI analyzes the business requirement and generates comprehensive acceptance test scenarios
  3. Artifact generation — Three outputs are produced simultaneously:
    • Functional Test Scenarios — Structured test cases derived from business requirements
    • Gherkin Feature File — BDD scenarios in .feature format for use in integration tests
    • API Specification — OpenAPI spec defining the service contracts implied by the requirement
  4. 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

  1. Navigate to Create Test in the RoostGPT web interface
  2. Set Test Type to Functional
  3. 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 .txt file
  4. Configure your AI provider and Git repository
  5. 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:

ProviderInput TokensOutput TokensApprox Cost
AWS Bedrock (Claude Sonnet 4)15K–50K10K–20K$0.20–$0.45 per test

Next Steps

After generating functional tests, use the output artifacts: