@salesforce/agents
    Preparing search index...

    Function determineTestRunner

    • Determines which test runner to use based on available metadata types in the org.

      This function checks for the presence of:

      • AiEvaluationDefinition (Testing Center)
      • AiTestingDefinition (Agentforce Studio)

      If a test definition with the same name exists in both metadata types, an error is thrown to prevent ambiguity.

      Parameters

      • connection: Connection

        The Salesforce connection

      • OptionaltestDefinitionName: string

        Optional test definition name to check for conflicts

      Returns Promise<TestRunnerType>

      'agentforce-studio' if only Agentforce Studio metadata exists, 'testing-center' if only Testing Center metadata exists

      if both metadata types exist with the same test definition name

      if neither metadata type exists

      const runnerType = await determineTestRunner(connection, 'MyTestSuite');
      if (runnerType === 'agentforce-studio') {
      const tester = new AgentforceStudioTester(connection);
      } else {
      const tester = new AgentTester(connection);
      }