ClaudeCode_Playwright_Demo: Command for Claude Code

.claude/commands/import_test_results_xray.md

import_test_results_xray is a command for Claude Code from anhtester/ClaudeCode_Playwright_Demo. It costs 21 tokens per session (681 once invoked), scanned A, a copy of import_test_results_xray, MIT.

A command for sending automated test results from tools such as Playwright, JUnit, or Allure to Xray, a test-management system connected to Jira.

In plain words
What is it for?
Use it to authenticate with Xray Cloud or Server, select a report file and format, and import the results.
Why use it?
It avoids entering test outcomes manually and makes automation results available for tracking in Jira.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is anhtester/ClaudeCode_Playwright_Demo's own configuration. It tells Claude Code how to work on ClaudeCode_Playwright_Demo itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ClaudeCode_Playwright_Demo configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/integrations/jira/xray_auth.js --verify.

Reuse

Borrowing it

Nothing to install: this file belongs to anhtester/ClaudeCode_Playwright_Demo. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/anhtester/ClaudeCode_Playwright_Demo/main/.claude/commands/import_test_results_xray.md
Clone the repo
git clone --depth 1 https://github.com/anhtester/ClaudeCode_Playwright_Demo

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/claudecode_playwright_demo/import_test_results_xray/github.svg)](https://agentmods.dev/commands/anhtester/claudecode_playwright_demo/import_test_results_xray)
Your own site
<a href="https://agentmods.dev/commands/anhtester/claudecode_playwright_demo/import_test_results_xray"><img src="https://agentmods.dev/badge/commands/anhtester/claudecode_playwright_demo/import_test_results_xray/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for import_test_results_xray

Your own site · 80×15
<a href="https://agentmods.dev/commands/anhtester/claudecode_playwright_demo/import_test_results_xray"><img src="https://agentmods.dev/badge/commands/anhtester/claudecode_playwright_demo/import_test_results_xray.svg" alt="Reviewed on agentmods" width="80" 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 681 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 95% copy Near-identical to another mod 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.1 $0.00021 $0.00681
Opus 5 $0.00010 $0.00341
Sonnet 5 $0.00004 $0.00136
Haiku 4.5 $0.00002 $0.00068

Measured 9d ago against content hash 63bf13a7012e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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

This is a copy

95% identical to import_test_results_xray — 6 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.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 jira_integration (tại .agent/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 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. 9d ago First seen · 60 lines · 21 tokens per session scan A 63bf13a7012e

Subscribe to this mod's changes

import_test_results_xray is a command published in the GitHub repository anhtester/ClaudeCode_Playwright_Demo (2 stars, last pushed 3mo ago), licensed MIT. It adds 21 tokens to every session and 681 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to import_test_results_xray, differing in 6 lines, and is treated as a copy.