Zephyr Scale Integration
TestIntel integrates with Zephyr Scale for Jira Cloud to sync test cases and results.
Setup
1. Generate API token
Go to https://id.atlassian.com/manage-profile/security/api-tokens and create a new token. This is a separate JWT token from your Jira API token.
2. Set environment variables
$env:ZEPHYR_API_TOKEN="your-zephyr-jwt-token"
3. Configure config.yaml
zephyr:
api_token_env_var: ZEPHYR_API_TOKEN
base_url: https://api.zephyrscale.smartbear.com/v2
project_key: HR
4. Run schema discovery
testintel discover
This scans your Zephyr instance for test case statuses, execution statuses, and priorities. All Zephyr operations use these discovered mappings.
Usage
Zephyr sync is available via the Web UI Sync bar (Inventory tab) and API endpoints.
Web UI
- Go to the Inventory tab
- The Sync bar appears automatically when Zephyr is configured
- Use the ⬇ Zephyr Pull, ⬆ Zephyr Push, and ⬇ Zephyr Results buttons
- Push operations show real-time progress via SSE streaming
- Select specific tests with checkboxes before pushing to push only those tests
API
# Pull tests into inventory
curl -X POST http://localhost:8000/sync/zephyr/pull -H "x-api-key: your-key"
# Push inventory to Zephyr
curl -X POST http://localhost:8000/sync/zephyr/push -H "x-api-key: your-key"
# Push specific tests
curl -X POST "http://localhost:8000/sync/zephyr/push?test_ids=TC-0001,TC-0002" -H "x-api-key: your-key"
# Push test results
curl -X POST http://localhost:8000/sync/zephyr/push-results -H "x-api-key: your-key"
# Pull test results
curl -X POST http://localhost:8000/sync/zephyr/pull-results -H "x-api-key: your-key"
Schema discovery (CLI)
testintel discover
This is a one-time setup command that scans your Zephyr instance and writes mappings to testintel_data/schema.yaml.
How it works
- Authentication: JWT bearer token via
Authorization: Bearer - API base:
https://api.zephyrscale.smartbear.com/v2 - Test cases: Created via REST. Steps are added separately via
POST /testcases/{key}/teststeps(Zephyr API doesn't accept steps in the create body) - Results: Require a Test Cycle. Push creates a cycle first, then adds executions
- Mapping: Pulled tests are tagged with
Zephyr-Importand the Zephyr key (e.g.HR-T1) for round-trip sync - Schema-driven: Priority and status mappings come from
testintel discover
Tags on pull
When you pull tests from Zephyr Scale, TestIntel adds tags automatically for traceability and round-trip sync:
| Tag | Source | Purpose |
|---|---|---|
Zephyr-Import | Always added | Identifies tests imported from Zephyr |
Zephyr-StepByStep | Test script type = Step-by-Step | Script format — structured steps |
Zephyr-PlainText | Test script type = Plain Text | Script format — freeform text |
Zephyr-BDD | Test script type = BDD | Script format — Gherkin/Cucumber |
| *(user labels)* | Zephyr labels field | Any labels assigned to the test in Zephyr |
If a pulled test triggers duplicate detection against existing inventory (≥80% name similarity), it also receives Needs Review - Potential Duplicate.
These tags are metadata only — the type field (E2E, Integration, etc.) is determined separately via label/tag scanning configured in config.yaml.
Status sync
When you update a test case's lifecycle status (Draft/Approved/Deprecated) in TestIntel, the change is automatically pushed back to Zephyr Scale if:
- The test has a Zephyr external key (i.e. it was pulled from Zephyr)
- Zephyr credentials are configured
This works for:
- Manual status changes via the API (
PUT /inventory/{test_id}) - Tests promoted from Staging to Inventory (automatically set to "Approved")
If the sync fails (e.g. network issue), the local status is still updated and a warning is logged.
Web UI
Zephyr sync buttons appear automatically in the Inventory tab when ZEPHYR_API_TOKEN is set:
- ⬇ Zephyr Pull — pull tests into inventory
- ⬆ Zephyr Push — push inventory tests to Zephyr (with real-time SSE progress)
- ⬇ Zephyr Results — pull execution results