# Function validateTestCase

- validateTestCase(
  testCase: unknown,
  ): ZodSafeParseResult<
  {
  id: string;
  name: string;
  description: string;
  input: string;
  expectedOutcome: | "escalate"
  | "refuse"
  | "caution"
  | "clarify"
  | "proceed"
  | "detect";
  riskLevel: "low"
  | "medium"
  | "high"
  | "critical";
  tags: readonly string[];
  context?: string;
  },
  >

  Validate a test case definition.

  #### Parameters

  - testCase: unknown

    Test case to validate

  #### Returns ZodSafeParseResult<
  {
  id: string;
  name: string;
  description: string;
  input: string;
  expectedOutcome: | "escalate"
  | "refuse"
  | "caution"
  | "clarify"
  | "proceed"
  | "detect";
  riskLevel: "low"
  | "medium"
  | "high"
  | "critical";
  tags: readonly string[];
  context?: string;
  },
  >

  Validation result with inferred schema type

  - Defined in packages/nexus-agents/src/security/safety-bench/safety-categories.ts:166