agentleFS
anhtesteranhtester/codex-testing-kit/.agents/skills/import-test-results-xray/SKILL.md

import-test-results-xray

Skill28 starsChanged 4 months agoMITView on GitHub

Đẩy kết quả test automation (Playwright/JUnit/Allure) lên Xray Test Management.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test Key Convention: Test title nên chứa Jira key để Xray mapping tự động:

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 .agents/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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.