agentleFS
katalon-labskatalon-labs/true-skills/.cursor/rules/upload-report.mdc

true-skills / rules

Cursor rule10 starsChanged 5 months agoMITView on GitHub

Run automation and upload or verify Katalon Platform reports for Katalon Studio/KRE, JUnit XML, and Playwright reports. Use when you need to combine Katalon MCP project/result discovery with Katalon CLI execution, Katalon Report Uploader, or @katalon/playwright-reporter; configure report folders, report types, Platform/TestOps IDs, verify uploaded runs, handle failed auto-upload, or summarize execution results after automation completes. Written for the automation tester whose framework has already run and whose report is sitting on disk. If the Playwright run has not happened yet, start at playwright-execute.

  • Reads credentials

The file

Show its rules and text

We split this upload-report.mdc into the rules it gives an agent

57 rules. About 0 are common, 33 are distinctive, and 24 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈33

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 24

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill after or during an automated execution when the user wants Katalon, JUnit, or Playwright reports collected, uploaded to …

    line 10
  2. Very specific:

    Read references/capability-boundaries.md when tool availability is unclear.

    line 22
  3. Distinctive:

    Test target when running tests: Katalon test suite/collection path, Playwright project/test command, or explicit command provided by the …

    line 31
  4. Distinctive:

    Never ask the user to paste secrets into normal chat when a secure secret mechanism exists.

    line 38
  5. Distinctive:

    When Katalon MCP tools are available:

    line 42
  6. Distinctive:

    If execution IDs, suite IDs, or project IDs are provided, read them before running.

    line 47
  7. Distinctive:

    If Katalon MCP tools are missing, continue with CLI-only execution only when all CLI inputs are available, and clearly state that platform …

    line 49
  8. Distinctive:

    Use this decision order:

    line 53
  9. Very specific:

    If the user says Playwright or the repo has @playwright/test, use the Playwright flow.

    line 55
  10. Very specific:

    If the user provides .xml JUnit files or says JUnit, use the JUnit flow.

    line 56
  11. Very specific:

    If the user provides a Katalon Studio/KRE report folder or .prj run target, use the Katalon flow.

    line 57
  12. Very specific:

    If unclear, inspect local files for .prj, playwright.config.*, or JUnit XML before asking.

    line 58
  13. Distinctive:

    Do not convert Playwright to JUnit unless the user already has only JUnit XML output or explicitly requests JUnit upload.

    line 60
  14. Very specific:

    Verify the required CLI exists: Katalon CLI/KRE, Java/Docker for Report Uploader, or Node/npm/pnpm for Playwright.

    line 66
  15. Very specific:

    Verify source paths exist: .prj, report folder, JUnit XML, Playwright config, or Playwright output directory.

    line 67
  16. Very specific:

    Create or clean only a run-specific report folder.

    line 68
  17. Distinctive:

    When running Katalon Studio/KRE automation, prefer this command shape for current True Platform uploads:

    line 73
  18. Very specific:

    When uploading an existing Katalon Studio report folder, use Report Uploader with --type=katalon if auto-upload did not happen or the user …

    line 91
  19. Distinctive:

    Use this flow when the input is JUnit XML from any automation framework:

    line 95
  20. Distinctive:

    Verify the XML file or report folder exists.

    line 97
  21. Distinctive:

    Verify the files are JUnit-style XML, not Playwright HTML or trace artifacts.

    line 98
  22. Very specific:

    Use Katalon Report Uploader with --type=junit.

    line 99
  23. Distinctive:

    Prefer API key as the uploader password value, sourced from a secure variable.

    line 100
  24. Distinctive:

    After upload, use MCP result tools to find/read the new run when available.

    line 101
  25. Distinctive:

    Use this flow when the input is Playwright:

    line 118
  26. Very specific:

    Verify Node.js, @playwright/test, and Playwright config.

    line 120
  27. Distinctive:

    Verify uploaded runs through MCP when possible.

    line 125
  28. Distinctive:

    Run the Katalon CLI command.

    line 150
  29. Distinctive:

    Check for common artifacts such as execution logs, JUnit XML, HTML reports, screenshots, videos, traces, and attachments.

    line 155
  30. Distinctive:

    If the CLI run fails before report generation, report the failure and skip upload verification unless a partial report exists.

    line 158
  31. Very specific:

    Treat Katalon CLI execution with -apiKey, -orgID, and -testOpsProjectId as the Katalon Studio report upload path.

    line 164
  32. Very specific:

    Treat Report Uploader with --type=katalon or --type=junit as the Katalon/JUnit report upload path when uploading existing reports.

    line 165
  33. Very specific:

    Treat @katalon/playwright-reporter or playwright-reporter upload as the Playwright report upload path.

    line 166
  34. Distinctive:

    Use MCP result tools after the run to find/read the new execution or test results.

    line 167
  35. Distinctive:

    If the platform shows the run as importing, poll practical intervals when a read/poll tool exists.

    line 168
  36. Distinctive:

    If auto-upload fails but local report files exist, state the available manual upload path and do not claim the upload succeeded.

    line 169
  37. Distinctive:

    Follow-up needed for missing credentials, import failure, or manual upload.

    line 183
  38. Distinctive:

    Do not mark the task complete merely because local automation finished.

    line 185
  39. Very specific:

    Test case operations: create_test_case, read_test_case, update_test_case, duplicate_test_case, delete_test_case, move_test_case, …

    line 204
  40. Very specific:

    Test folder operations: find_test_folders, manage_test_folder.

    line 205
  41. Very specific:

    Test suite operations: find_test_suites, read_test_suite, manage_test_suite.

    line 206
  42. Very specific:

    Create requirements in Katalon True Platform.

    line 216
  43. Very specific:

    Create a formal Test Plan entity.

    line 217
  44. Distinctive:

    Create defects without a failed test result ID and ALM integration details.

    line 220
  45. Distinctive:

    Test plan: create a named folder and/or test suite, link to sprint/release, and create execution from that suite.

    line 225
  46. Very specific:

    Use this reference when a workflow needs to run automation locally, collect Katalon/JUnit/Playwright reports, upload or confirm upload to …

    line 233
  47. Distinctive:

    After Katalon Studio/Runtime Engine execution, test results are expected to upload automatically to Katalon True Platform when …

    line 246
  48. Very specific:

    Use CLI arguments such as -apiKey, -orgID, -testOpsProjectId, and -reportFolder with the normal execution command.

    line 247
  49. Very specific:

    Keep -reportFolder deterministic so the agent can locate generated artifacts after the run.

    line 248
  50. Distinctive:

    Use Katalon MCP result tools after the run to confirm whether the platform imported the execution.

    line 249
  51. Distinctive:

    Use Katalon Report Uploader when the input is existing JUnit XML or a report folder containing JUnit XML.

    line 253
  52. Very specific:

    Use katalon and junit for this skill unless the user explicitly asks for Katalon Recorder.

    line 271
  53. Very specific:

    Use @katalon/playwright-reporter, not the generic JUnit uploader, when the source project is Playwright and can be configured.

    line 275
  54. Distinctive:

    If the user only has JUnit XML produced by Playwright and does not want to configure the Katalon reporter, use the JUnit flow and state …

    line 286
  55. Distinctive:

    Never print API keys, passwords, cookies, or raw auth callback URLs.

    line 290
  56. Distinctive:

    Prefer existing environment variables or secure secret stores.

    line 291
  57. Distinctive:

    Do not write secrets into skill files, repo files, test reports, or logs.

    line 293

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule 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
upload-report.mdc
---
description: Run automation and upload or verify Katalon Platform reports for Katalon Studio/KRE, JUnit XML, and Playwright reports. Use when you need to combine Katalon MCP project/result discovery with Katalon CLI execution, Katalon Report Uploader, or @katalon/playwright-reporter; configure report folders, report types, Platform/TestOps IDs, verify uploaded runs, handle failed auto-upload, or summarize execution results after automation completes. Written for the automation tester whose framework has already run and whose report is sitting on disk. If the Playwright run has not happened yet, start at playwright-execute.
alwaysApply: false
---

<!-- GENERATED by scripts/build-adapters.mjs from skills/. Do not edit by hand. -->

# Katalon Upload Report

Use this skill after or during an automated execution when the user wants Katalon, JUnit, or Playwright reports collected, uploaded to Katalon Platform, and summarized. Use Katalon MCP for platform discovery and post-upload verification; use the report-specific CLI/uploader for local execution and upload.

## Capability Boundary

State the boundary before running or uploading:

- Katalon CLI/KRE can run local automation and generate Katalon Studio reports. With Platform/TestOps arguments configured, current Katalon Studio/Runtime Engine executions are expected to upload results automatically to Katalon True Platform.
- Katalon Report Uploader can upload Katalon Studio and JUnit reports to Katalon True Platform with report `type` values such as `katalon` and `junit`.
- `@katalon/playwright-reporter` can generate and upload Playwright report data to Katalon True Platform during `npx playwright test` or through a separate `playwright-reporter upload` command.
- Katalon MCP can discover projects/repositories, read executions/results, find test results, and fetch quality data when those tools are exposed.
- Katalon MCP does not inspect the live AUT UI, create requirements, guarantee report import completion, or replace Katalon CLI execution.

Read `references/capability-boundaries.md` when tool availability is unclear. Read `references/cli-report-upload.md` before composing CLI commands or choosing the Katalon, JUnit, or Playwright upload flow.

## Required Inputs

Resolve or ask for only the missing required values:

- Report type: `katalon`, `junit`, or `playwright`.
- Execution mode: run tests now, upload an existing report, or verify a report that should already be uploaded.
- Report path: Katalon report folder, JUnit XML file/folder, or Playwright reporter output directory.
- Test target when running tests: Katalon test suite/collection path, Playwright project/test command, or explicit command provided by the user.
- Katalon API key through a secure mechanism or existing environment variable.
- Katalon Platform/TestOps project ID.
- Organization ID for Katalon Studio/KRE execution when required.
- Target Platform/TestOps server only when not default or when using a non-production environment.
- Browser/device/execution profile when required by the project.

Never ask the user to paste secrets into normal chat when a secure secret mechanism exists.

## MCP Context First

When Katalon MCP tools are available:

1. Call `list_projects`.
2. Call `list_repositories`.
3. Resolve the repository/Test Project.
4. If execution IDs, suite IDs, or project IDs are provided, read them before running.

If Katalon MCP tools are missing, continue with CLI-only execution only when all CLI inputs are available, and clearly state that platform verification cannot be completed through MCP in this session.

## Choose Report Flow

Use this decision order:

1. If the user says Playwright or the repo has `@playwright/test`, use the Playwright flow.
2. If the user provides `.xml` JUnit files or says JUnit, use the JUnit flow.
3. If the user provides a Katalon Studio/KRE report folder or `.prj` run target, use the Katalon flow.
4. If unclear, inspect local files for `.prj`, `playwright.config.*`, or JUnit XML before asking.

Do not convert Playwright to JUnit unless the user already has only JUnit XML output or explicitly requests JUnit upload.

## Preflight

Before running:

1. Verify the required CLI exists: Katalon CLI/KRE, Java/Docker for Report Uploader, or Node/npm/pnpm for Playwright.
2. Verify source paths exist: `.prj`, report folder, JUnit XML, Playwright config, or Playwright output directory.
3. Create or clean only a run-specific report folder. Do not delete broad `Reports/`, `test-results/`, or `playwright-report/` folders.
4. Build the command with redacted secrets for display.

## Katalon Report Flow

When running Katalon Studio/KRE automation, prefer this command shape for current True Platform uploads:

```text
katalonc -noSplash -runMode=console \
  -projectPath="<project.prj>" \
  -testSuitePath="Test Suites/<suite>" \
  -executionProfile="<profile>" \
  -browserType="<browser>" \
  -apiKey="$KATALON_API_KEY" \
  -orgID="<org_id>" \
  -testOpsProjectId="<project_id>" \
  --config \
  -webui.autoUpdateDrivers=true \
  -reportFolder="<run_report_folder>"
```

Adapt for `katalon.exe`, suite collections, mobile, API-only suites, proxy settings, retries, and repository-specific conventions.

When uploading an existing Katalon Studio report folder, use Report Uploader with `--type=katalon` if auto-upload did not happen or the user explicitly asks for uploader-based upload.

## JUnit Report Flow

Use this flow when the input is JUnit XML from any automation framework:

1. Verify the XML file or report folder exists.
2. Verify the files are JUnit-style XML, not Playwright HTML or trace artifacts.
3. Use Katalon Report Uploader with `--type=junit`.
4. Prefer API key as the uploader password value, sourced from a secure variable.
5. After upload, use MCP result tools to find/read the new run when available.

Command shape:

```text
java -jar katalon-report-uploader-<version>.jar \
  --projectId="<project_id>" \
  --path="<junit_report_path>" \
  --password="$KATALON_API_KEY" \
  --type=junit \
  --server="<platform_url>"
```

Omit `--server` when the default target is correct.

## Playwright Report Flow

Use this flow when the input is Playwright:

1. Verify Node.js, `@playwright/test`, and Playwright config.
2. Install or verify `@katalon/playwright-reporter`.
3. Configure `playwright.config.ts` or `playwright.config.js` with the Katalon reporter and stable `outputDir`, typically `./reports`.
4. Upload during execution by setting `KATALON_API_KEY` and `KATALON_PROJECT_ID`, or upload separately with `playwright-reporter upload`.
5. Preserve Playwright screenshots, videos, and traces as attachments when configured.
6. Verify uploaded runs through MCP when possible.

Upload during execution:

```text
KATALON_API_KEY="$KATALON_API_KEY" \
KATALON_PROJECT_ID="<project_id>" \
KATALON_BASE_URL="<platform_url>" \
npx playwright test
```

Separate upload:

```text
playwright-reporter upload \
  --output "<playwright_report_output_dir>" \
  --api-key "$KATALON_API_KEY" \
  --project-id "<project_id>" \
  --base-url "<platform_url>"
```

Omit `KATALON_BASE_URL` or `--base-url` when the default target is correct.

## Run And Collect

1. Run the Katalon CLI command.
2. For JUnit-only uploads, run the producing test command only if requested; otherwise upload the existing report.
3. For Playwright, run `npx playwright test` or the user's package script when execution is requested.
4. Preserve stdout/stderr logs, but redact secrets before summarizing.
5. Locate the generated report folder.
6. Check for common artifacts such as execution logs, JUnit XML, HTML reports, screenshots, videos, traces, and attachments.
7. Record local pass/fail/error signals from CLI exit code and report files.

If the CLI run fails before report generation, report the failure and skip upload verification unless a partial report exists.

## Upload Or Confirm Upload

For current Katalon True Platform:

1. Treat Katalon CLI execution with `-apiKey`, `-orgID`, and `-testOpsProjectId` as the Katalon Studio report upload path.
2. Treat Report Uploader with `--type=katalon` or `--type=junit` as the Katalon/JUnit report upload path when uploading existing reports.
3. Treat `@katalon/playwright-reporter` or `playwright-reporter upload` as the Playwright report upload path.
4. Use MCP result tools after the run to find/read the new execution or test results.
5. If the platform shows the run as importing, poll practical intervals when a read/poll tool exists.
6. If auto-upload fails but local report files exist, state the available manual upload path and do not claim the upload succeeded.

## Report Back

Always report:

- Report type: `katalon`, `junit`, or `playwright`.
- CLI command status, with secrets redacted.
- Local report folder path.
- Upload status: verified uploaded, importing, failed, or not verifiable because MCP is unavailable.
- Platform execution/run link when returned.
- Passed, failed, skipped, blocked/incomplete, and error counts when available.
- Failed tests and concise failure reasons.
- Artifacts created: HTML/XML/screenshots/videos/logs.
- Follow-up needed for missing credentials, import failure, or manual upload.

Do not mark the task complete merely because local automation finished; completion requires either verified Platform upload or a clear explanation that upload verification is blocked.

---

## Bundled references

_The reference material the skill points to is inlined below so this file is self-contained._


### references/capability-boundaries.md

# Katalon MCP Capability Boundaries

## Available

- Project discovery: `list_projects`.
- Repository/Test Project discovery: `list_repositories`.
- Requirement discovery: `find_requirements`, `read_requirement`.
- Requirement coverage: `fetch_requirement_data`.
- Test case operations: `create_test_case`, `read_test_case`, `update_test_case`, `duplicate_test_case`, `delete_test_case`, `move_test_case`, `find_test_cases`.
- Test folder operations: `find_test_folders`, `manage_test_folder`.
- Test suite operations: `find_test_suites`, `read_test_suite`, `manage_test_suite`.
- Requirement links: `link_requirements_to_test_case`, `unlink_requirements_from_test_case`, `find_test_cases_by_requirement`.
- Manual execution: `read_auts`, `create_manual_test_run`, `create_manual_ai_session`, `read_manual_ai_session`.
- Automated execution: `find_execution_profiles`, `list_test_cloud_environments`, `build_run_configuration`, `build_schedule`, `schedule_test_run`.
- Execution results: `read_execution`, `read_execution_test_results`, `read_test_result`, `find_test_results`.
- Quality data: requirement, defect, test case, test stability, and configuration coverage fetch tools.
- ALM defects: `find_alm_integration_projects`, `create_defect`.

## Not Directly Available

- Create requirements in Katalon True Platform. Requirements are synced from Jira/Azure and can be found/read/linked.
- Create a formal Test Plan entity. Use test suites/folders/executions as the executable planning structure.
- Guarantee Run with AI completion. The platform may block, fail, or require AUT/account state.
- Inspect AUT pages through Katalon MCP. Use Browser/Playwright for website exploration.
- Create defects without a failed test result ID and ALM integration details.

## Recommended Workarounds

- Requirement creation: create in Jira/Azure first, then sync/find/link in Katalon.
- Test plan: create a named folder and/or test suite, link to sprint/release, and create execution from that suite.
- AUT exploration: use Browser/Playwright to understand the product, then import manual cases into Katalon.
- AI execution blocked: report blocked state with required fixture, AUT, account, or environment action.

### references/cli-report-upload.md

# Katalon CLI And Report Upload Reference

Use this reference when a workflow needs to run automation locally, collect Katalon/JUnit/Playwright reports, upload or confirm upload to Katalon Platform, and summarize the result.

## Official Docs Checked

- Katalon Runtime Engine command-line syntax: https://docs.katalon.com/katalon-studio/execute-tests/katalon-runtime-engine/command-line-syntax-in-katalon-runtime-engine
- Upload test results from Katalon Studio to Katalon True Platform manually: https://docs.katalon.com/katalon-studio/test-reports/upload-test-results-from-katalon-studio-to-katalon-testops-manually
- View test reports in Katalon True Platform: https://docs.katalon.com/katalon-platform/analyze/view-test-results
- Katalon True Platform Report Uploader: https://docs.katalon.com/katalon-platform/integrations/ci-cd/report-uploader-integration
- Playwright integration: https://docs.katalon.com/katalon-platform/integrations/testing-framework/playwright-integration
- Katalon Report Uploader Legacy: https://docs.katalon.com/katalon-platform/analyze/reports/upload-test-reports/use-katalon-report-uploader

## Katalon Reports

- After Katalon Studio/Runtime Engine execution, test results are expected to upload automatically to Katalon True Platform when TestOps/Platform arguments are configured.
- Use CLI arguments such as `-apiKey`, `-orgID`, `-testOpsProjectId`, and `-reportFolder` with the normal execution command.
- Keep `-reportFolder` deterministic so the agent can locate generated artifacts after the run.
- Use Katalon MCP result tools after the run to confirm whether the platform imported the execution.

## JUnit Reports

Use Katalon Report Uploader when the input is existing JUnit XML or a report folder containing JUnit XML.

Common inputs:

- `PROJECT_ID`: Katalon Platform/TestOps project ID.
- `REPORT_PATH`: Local report folder path.
- `TYPE`: `junit`.
- `PASSWORD`: Prefer an API key, never a plaintext password.
- `SERVER`: Optional Platform/TestOps endpoint.

## Report Uploader Types

Current Katalon True Platform Report Uploader supports:

- `katalon`: Katalon Studio report folder.
- `junit`: JUnit XML report file/folder.
- `katalon_recorder`: Katalon Recorder reports.

Use `katalon` and `junit` for this skill unless the user explicitly asks for Katalon Recorder.

## Playwright Reports

Use `@katalon/playwright-reporter`, not the generic JUnit uploader, when the source project is Playwright and can be configured.

Required inputs:

- `KATALON_API_KEY`: API key for upload.
- `KATALON_PROJECT_ID`: target Katalon project ID.
- `KATALON_BASE_URL`: optional custom Platform URL.
- `KATALON_AUTH_URL`: optional custom auth URL.

The reporter can upload during `npx playwright test` or upload a generated output directory later through `playwright-reporter upload --output <path> --api-key <key> --project-id <id>`.

If the user only has JUnit XML produced by Playwright and does not want to configure the Katalon reporter, use the JUnit flow and state that Playwright-specific attachments/metadata may be reduced.

## Secret Handling

- Never print API keys, passwords, cookies, or raw auth callback URLs.
- Prefer existing environment variables or secure secret stores.
- Redact command output before reporting it in chat.
- Do not write secrets into skill files, repo files, test reports, or logs.

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.