Skip to content

How do I migrate test cases from Xray to Testomat?

Migrating from Xray is a two-stage process, and the test IDs are what keep your CI results from duplicating.

Follow the migrate-xray script. It pulls your test cases through the Xray API and converts them to a Testomat.io-compatible CSV.

In your project:

  1. Go to the Imports tab
  2. Import from CSV
  3. Choose Testomat.io from the dropdown (not XRay - that option just shows you the script instructions).
  4. Select the file the script generated and click Create.

Full walkthrough with screenshots: https://docs.testomat.io/project/import-export/import/import-tests-from-xray/

Section titled “Link your automated tests to the imported cases”

Run check-tests with --update-ids against your test code:

npx check-tests <framework> "<test file pattern>" --update-ids

This writes the Testomat.io test IDs into your test files. From then on, when CI runs those tests, the reporter sends results to the existing test cases instead of creating new ones — that’s what prevents duplication.

Add the same command to CI so new tests get IDs automatically on every push to main: https://docs.testomat.io/project/import-export/import/auto-import/