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

  1. Go to the Inventory tab
  1. The Sync bar appears automatically when Zephyr is configured
  1. Use the ⬇ Zephyr Pull, ⬆ Zephyr Push, and ⬇ Zephyr Results buttons
  1. Push operations show real-time progress via SSE streaming
  1. 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

Tags on pull

When you pull tests from Zephyr Scale, TestIntel adds tags automatically for traceability and round-trip sync:

TagSourcePurpose
Zephyr-ImportAlways addedIdentifies tests imported from Zephyr
Zephyr-StepByStepTest script type = Step-by-StepScript format — structured steps
Zephyr-PlainTextTest script type = Plain TextScript format — freeform text
Zephyr-BDDTest script type = BDDScript format — Gherkin/Cucumber
*(user labels)*Zephyr labels fieldAny 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:

This works for:

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: