SuperAPI AI Directory

case

Testing & quality

View repository

Updated 10-16 08:45

About this skill

Testany Case CRUD

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 user
  • runtime_uuid: the UUID corresponding to the runtime selected by the user
  • is_private: globally visible = false, specific workspaces = true
  • workspace_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:

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

  1. Call testany_get_case to get the current configuration
  2. Use AskUserQuestion to confirm which fields to modify and their new values
  3. Call testany_update_case to 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 workspace
  • keyword - Search by name keyword
  • version - Filter by version
  • environment - Filter by environment
  • page / page_size - Pagination

Bulk Update

Call testany_bulk_update_casesto batch update multiple cases':

  • version - Version
  • environments - Environment list
  • workspaces - Workspace list
  • is_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_labels field
  • 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:

  1. Call testany_dry_run_case → trigger dry run, return dry_run_id
  2. Call testany_get_dry_run_result → use dry_run_id to query results

Complete Tool List

15 MCP tools in total:

Single Case CRUD (6)

  • testany_create_case - Create case
  • testany_get_case - Get case details
  • testany_get_case_script - Get case script content
  • testany_update_case - Update case configuration
  • testany_update_case_script - Update case script
  • testany_delete_case - Delete case

Bulk Case CRUD (4)

  • testany_list_cases - Search/list cases
  • testany_list_my_cases - List my cases
  • testany_bulk_update_cases - Batch update
  • testany_bulk_delete_cases - Batch delete

Auxiliary (5)

  • testany_filter_case_runtimes - Get runtime environment list
  • testany_filter_case_versions - Get version list
  • testany_filter_case_environments - Get environment list
  • testany_dry_run_case - Trigger dry run
  • testany_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:

  1. Get documentation structure:WebFetch https://docs.testany.io/sitemap.xml
  2. Find relevant pages: search for keywords from the sitemap (e.g., case、relay、credential)
  3. 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: