This skill manages test cases on the Testany platformthrough the Testany MCP tool. All operations are remote API calls to the Testany platform and do not involve the local file system.
Note: If the user needs towritetest scripts, please tell them to use the /case-writing command.
User input: $ARGUMENTS
Operation Quick Reference
| User Intent | Operation Type | Tool |
|---|---|---|
| Create a new case | Create | testany_create_case → testany_update_case → testany_update_case_script |
| View case details | Read | testany_get_case |
| View case script content | Read | testany_get_case_script |
| Search/list cases | Read | testany_list_cases |
| List my cases | Read | testany_list_my_cases |
| Modify case configuration | Update | testany_update_case |
| Update case script | Update | testany_update_case_script |
| Delete case | Delete | testany_delete_case |
| Batch update cases | Bulk Update | testany_bulk_update_cases |
| Batch delete cases | Bulk Delete | testany_bulk_delete_cases |
| Validate case configuration | Validate | testany_dry_run_case → testany_get_dry_run_result |
Single Case Operations
Create
Creating a new case is divided into three stages: first collect the optional items, then ask the user all at once, and finally perform the creation.
Stage 1: Collect optional items (parallel calls)
Call the following tools simultaneously to get the optional items:
testany_filter_case_runtimes→ Get the list of runtimes (uuid + name)testany_get_my_workspaces→ Get the list of workspaces the user has permission for
Stage 2: Ask the user all at once (a single AskUserQuestion)
Use AskUserQuestion to ask the following questions all at once:
| Question | Type | Option Source |
|---|---|---|
| Case Name | User input | - |
| Runtime | Single select | runtimes obtained in Stage 1 (display name, cloudprime recommended) |
| Visibility | Single select | "Globally visible (everyone)" / "Visible only to specific workspaces" |
| Workspace | Multi-select | workspaces obtained in Stage 1 (only needed when "specific workspaces" is selected) |
Note: AskUserQuestion supports at most 4 questions. If the user selects "globally visible", the workspace question can be skipped.
Stage 3: Create the case
Based on the user's answers, call testany_create_case:
name: the name entered by the userruntime_uuid: the UUID corresponding to the runtime selected by the useris_private: globally visible = false, specific workspaces = trueworkspace_keys: if is_private=true, pass in the list of workspaces selected by the user; otherwise[]
Stage 4: Configure the execution method (optional)
If the user has a test script, case_meta.trigger_method:
- Call
testany_update_caseto set up the executor and trigger configuration - For detailed configuration rules, see Executor Configuration Details
Stage 5: Upload the script (optional)
Call testany_update_case_script to upload the test script.
Read (Query)
| Scenario | Tool | Description |
|---|---|---|
| Get details of a single case | testany_get_case |
Pass in the case key |
| Get case script content | testany_get_case_script |
Download the ZIP and return the file content |
Update
Updatable fields
| Field | Description |
|---|---|
name |
Case name |
description |
Description |
is_private |
Visibility (true=private, false=global) |
workspace_keys |
List of visible workspaces |
environments |
List of environment labels |
case_labels |
List of labels |
case_version |
Version number |
owned_by |
Owner email |
case_meta |
Execution configuration (trigger_method, environment_variables) |
Update configuration workflow
- Call
testany_get_caseto get the current configuration - Use AskUserQuestion to confirm which fields to modify and their new values
- Call
testany_update_caseto submit the update (pass only the fields that need to be modified)
Update script
Call testany_update_case_script to upload the new test script.
Detect Relay / Credentials usage in the script
If the script uploaded by the user contains the following code, the corresponding settings need to be configured in testany_update_case :
| Code characteristic in the script | Needs to be configured |
|---|---|
TESTANY_OUTPUT_RELAY_SERVICE |
Add type='output' environment variables |
TESTANY_SECRETS_SERVICE |
Bind credential safe and credential keys |
Detection method: Call testany_get_case_script to read the script content and search for the above keywords.
Delete
Call testany_delete_case, passing in the case key.
Warning: This operation cannot be undone.
Bulk Case operations
List / Search
| Scenario | Tool |
|---|---|
| Search all cases | testany_list_cases |
| List only my cases | testany_list_my_cases |
Supported filter conditions:
workspace- Filter by workspacekeyword- Search by name keywordversion- Filter by versionenvironment- Filter by environmentpage/page_size- Pagination
Bulk Update
Call testany_bulk_update_casesto batch update multiple cases':
version- Versionenvironments- Environment listworkspaces- Workspace listis_private- Visibility
Note: During Append operations, duplicate keys will overwrite existing values.
Bulk Delete
Call testany_bulk_delete_cases, passing in an array of case keys.
Warning: This operation cannot be undone.
Labels and directory view
Testany uses labels to implement a virtual directory structure:
- Manage a case's labels through the
case_labelsfield - A case can have multiple labels, thereby appearing under multiple directories
- Bulk operations can append or replace labels
Auxiliary operations
Filter
| Tool | Purpose |
|---|---|
testany_filter_case_runtimes |
Get the list of available runtime environments (must be called before creating a case) |
testany_filter_case_versions |
Get the list of available versions (for search filtering) |
testany_filter_case_environments |
Get the list of available environments (for search filtering) |
Dry Run (Validation)
Verify whether the case configuration is correct:
- Call
testany_dry_run_case→ trigger dry run, returndry_run_id - Call
testany_get_dry_run_result→ usedry_run_idto query results
Complete Tool List
15 MCP tools in total:
Single Case CRUD (6)
testany_create_case- Create casetestany_get_case- Get case detailstestany_get_case_script- Get case script contenttestany_update_case- Update case configurationtestany_update_case_script- Update case scripttestany_delete_case- Delete case
Bulk Case CRUD (4)
testany_list_cases- Search/list casestestany_list_my_cases- List my casestestany_bulk_update_cases- Batch updatetestany_bulk_delete_cases- Batch delete
Auxiliary (5)
testany_filter_case_runtimes- Get runtime environment listtestany_filter_case_versions- Get version listtestany_filter_case_environments- Get environment listtestany_dry_run_case- Trigger dry runtestany_get_dry_run_result- Get dry run results
Common Issue Handling
| Scenario | Handling Method |
|---|---|
| User did not provide a script but wants to create a case | Suggest using /case-writing to write the script first |
| Need relay output | 1) Configure the type='output' environment variable, 2) POST to TESTANY_OUTPUT_RELAY_SERVICE |
| Need to use credentials | 1) Bind credentials to the case, 2) Call TESTANY_SECRETS_SERVICE API |
| Update an existing case | First testany_get_case get the current configuration, use AskUserQuestion to confirm the modifications |
Return Format
After the task is completed, report to the user:
- Case Key (e.g.,
A1B2C3D4) - Case Name
- Executor type (if configured)
- Visibility (Global / Private + workspace list)
- Next-step suggestions (e.g., "you can create a pipeline to orchestrate execution")
Consult Official Documentation
When encountering uncertain issues, consult the Testany official documentation:
- Get documentation structure:
WebFetch https://docs.testany.io/sitemap.xml - Find relevant pages: search for keywords from the sitemap (e.g.,
case、relay、credential) - Read specific pages:
WebFetch https://docs.testany.io/en/docs/<page-name>/
Common Documentation Pages:
/en/docs/managing-test-case/- Test case management/en/docs/managing-test-case-with-relay-case/- Relay configuration/en/docs/managing-test-credential/- Credential management/en/docs/bulk-manage-test-cases/- Batch operations/en/docs/manage-directory-view-of-test-case/- Directory view
Reference Documentation
For detailed configuration rules, please refer to:
- Case Metadata Specification - Required reading: standards for filling in name/labels/description/env_vars, to ensure smooth Pipeline orchestration
- Executor Configuration Details - Includes trigger_method configuration and environment variable types
- Core Concepts - Includes visibility rules and entity definitions