import_test_results_xray

import_test_results_xray is a command for Claude Code from anhtester/claude-testing-kit. It costs 21 tokens per session (690 once invoked), scanned A, original, MIT.

A command that uploads automated-test results from Playwright, JUnit, or Allure into Xray, a test-management system connected to Jira.

In plain words
What is it for?
Checking Xray access, selecting a report format and file, and importing results into Xray Cloud or Xray Server/Data Center.
Why use it?
It keeps automated-test outcomes available for tracking in Jira instead of leaving them only in local report files.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/anhtester/claude-testing-kit/import_test_results_xray
Clone the repo
git clone --depth 1 https://github.com/anhtester/claude-testing-kit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for import_test_results_xray

README.md
[![agentmods](https://agentmods.dev/badge/commands/anhtester/claude-testing-kit/import_test_results_xray.svg)](https://agentmods.dev/commands/anhtester/claude-testing-kit/import_test_results_xray)
Your own site
<a href="https://agentmods.dev/commands/anhtester/claude-testing-kit/import_test_results_xray"><img src="https://agentmods.dev/badge/commands/anhtester/claude-testing-kit/import_test_results_xray.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 690 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00021 $0.00690
Opus 5 $0.00010 $0.00345
Sonnet 5 $0.00004 $0.00138
Haiku 4.5 $0.00002 $0.00069

Measured 5d ago against content hash d7b05a418cb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

import_test_results_xray scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/commands/import_test_results_xray.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Workflow: Import Test Results to Xray

BẮT BUỘC (MANDATORY SKILL): Bạn PHẢI nạp và đọc kỹ nội dung của skill skills-jira-integration (tại .claude/skills/skills-jira-integration/SKILL.md) để biết cách sử dụng scripts trước khi bắt đầu.

Workflow này giúp đẩy kết quả test automation lên Xray (Cloud hoặc Server/Data Center) để tracking trên Jira.

Các bước thực hiện:

  1. Kiểm tra prerequisites:

    • Đọc skill skills-jira-integration để nắm cấu trúc scripts.
    • Kiểm tra file .env đã cấu hình Xray credentials:
      • Xray Cloud: XRAY_CLIENT_ID, XRAY_CLIENT_SECRET
      • Xray Server: JIRA_PAT hoặc JIRA_EMAIL + JIRA_API_TOKEN
    • Kiểm tra XRAY_PLATFORM (cloud/server) trong .env.
    • Nếu chưa cài dependencies: cd scripts/integrations && npm install
  2. Verify Xray authentication:

    node scripts/integrations/jira/xray_auth.js --verify
    
    • Nếu thất bại: kiểm tra credentials trong .env
  3. Xác định report cần import:

    • Hỏi user loại report:
      • Playwright JSON: --format playwright --file <path-to-results.json>
      • JUnit XML: --format junit --file <path-to-junit.xml>
      • Xray JSON (đã convert sẵn): --format xray --file <path-to-xray.json>
    • Xác nhận Project Key (từ .env hoặc --project)
  4. Thực thi import:

    # Playwright report
    node scripts/integrations/jira/xray_importer.js --format playwright --file ./test-results.json --project PROJ
    
    # JUnit XML
    node scripts/integrations/jira/xray_importer.js --format junit --file ./junit-results.xml --project PROJ
    
    # Xray JSON
    node scripts/integrations/jira/xray_importer.js --format xray --file ./xray-payload.json
    
  5. Xử lý kết quả:

    • Kiểm tra output: Test Execution Key được tạo trên Jira.
    • Nếu thành công: thông báo user key của Test Execution mới.
    • Nếu thất bại: đọc log → phân tích nguyên nhân → fix → chạy lại.
  6. Lưu ý quan trọng:

    • Test Key Convention: Test title nên chứa Jira key để Xray mapping tự động:
      test('[PROJ-123] Login should work', async ({ page }) => { ... });
      
    • Xray Cloud cần authenticate riêng (Client ID + Secret), khác với Jira auth.
    • Rate limit: Tránh import quá nhiều lần liên tiếp.

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 60 lines · 21 tokens per session scan A d7b05a418cb8

Subscribe to this mod's changes

import_test_results_xray is a command published in the GitHub repository anhtester/claude-testing-kit (50 stars, last pushed 27d ago), licensed MIT. It adds 21 tokens to every session and 690 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.