Skip to main content

aip_sdk.list_test_plans

aip_sdk.list_test_plans(*, workspace_id: str | None = None, page: int = 1, per_page: int = 20, client: APIClient | None = None) -> TestPlanPage

List the test plans in a workspace, each at its latest published version, by name.

One row per methodology rather than one per publish, so a plan edited fifty times still reads as one entry. Reach an older version through list_test_plan_versions.

A listing does not derive required_columns or unresolved_metrics — that costs a catalogue lookup per row — so it returns TestPlanSummary rows, which do not carry either field. Call get_test_plan for the version you care about.

Parameters

  • workspace_id str | None: Workspace to list from. Falls back to the client's configured workspace.
  • page int: 1-based page number.
  • per_page int: Rows per page (1-100).
  • client APIClient | None: Explicit API client. Uses the default client when omitted.

Returns

  • TestPlanPage: A TestPlanPage — records are the plans on this page only, up to per_page of
  • TestPlanPage: them, not every plan in the workspace; total is how many exist behind every page,
  • TestPlanPage: letting a manual pager know when to stop. Use iter_test_plans to walk them all without
  • TestPlanPage: tracking that yourself. A page shorter than per_page — even an empty one — is never
  • TestPlanPage: proof the listing has ended: you may have paged past the end, or the platform had a
  • TestPlanPage: stored row it could not return this time while still counting it in total. Compare
  • TestPlanPage: against total, not len(records).

Raises

  • NoWorkspaceSelectedError: No workspace was given and the client has none configured.
  • InvalidArgumentError: page/per_page is out of range.
  • AuthError: Credentials are missing, invalid, or expired.
  • ForbiddenError: The caller is not a member of the workspace.
  • NotFoundError: The workspace does not exist. A workspace that exists but holds no plans returns an empty page instead.
  • ResponseParseError: A platform response did not match the shape this SDK version expects. Usually means the platform is running a newer release; upgrading resolves it.
  • APIError: Any other error from the platform.

Examples

import aip_sdk as aip

page = aip.list_test_plans(workspace_id="ws_001")
for summary in page:
print(summary.name, "v", summary.version, sorted(summary.plan.metrics))