Skip to content
| Marketplace
Sign in
Azure DevOps>Azure Pipelines>Run Test Bot
Run Test Bot

Run Test Bot

TestBots

|
19 installs
| (0) | Free
This task triggers a run for a test bot with configuration.
Get it free

Run Test Bot

Run test bot with JWT-based authentication for CI/CD pipelines

Inputs

jwtToken (required)

JWT token for authentication. The token must contain:

  • organizationId - Organization identifier (required)
  • urlDetails - Array containing URL configuration with key executorServiceApiUrl (required)
    • The executorServiceApiUrl value is used directly as the service endpoint

JWT Token Format:

{
  "organizationId": "c599bd03-9b32-46da-891a-267c351f207a",
  "organizationName": "Your Organization",
  "partnerId": "partner-uuid-here",
  "tokenType": "USER",
  "iat": 1234567890,
  "exp": 1234567890,
  "urlDetails": [
    {
      "key": "executorServiceApiUrl",
      "value": "https://ca-utap-gateway-svc.example.net/ca-utap-test-bot-executor-svc"
    }
  ]
}

testBotConfiguration (required)

Stringified JSON configuration for the test bot. Must include at minimum:

  • testBotId - The ID of the test bot to execute (required)

Additional optional fields:

{
  "testBotId": "string (required)",
  "projectId": "string (optional)",
  "name": "string (optional)",
  "executionConfiguration": {
    "browser": "string",
    "browserVersion": "string",
    "closeBrowserAfterEachExecution": "boolean",
    "customProperties": [
      {
        "customPropertyId": "string",
        "name": "string",
        "value": "string"
      }
    ],
    "type": "string",
    "gridId": "string",
    "excludeToBeRepairedTest": "boolean",
    "gridUrl": "string",
    "gridUrlForExecution": "string",
    "osType": "string",
    "resolution": "string",
    "screenshotAfterEachStep": "boolean",
    "screenshotOnError": "boolean",
    "screenshotOnFinish": "boolean",
    "timeout": "number",
    "waitForElementTimeout": "number"
  }
}

Example Usage

- task: runTestBot@1.4.5
  inputs:
    jwtToken: '$(JWT_TOKEN)'
    testBotConfiguration: '{"testBotId":"6d3879da-5bde-47d3-99c4-8639f0ce6e4a","name":"API Validation Test Bot"}'

How It Works

  1. Token Parsing: The task extracts organizationId and executorServiceApiUrl from the JWT token's urlDetails array
  2. Execution Trigger: Sends POST request to {executorServiceApiUrl}/rest/api/testops/{testBotId}/execute with JWT authentication
  3. Status Monitoring: Polls for execution status every 5 seconds at /rest/api/testops/execution/{executionId}/status
  4. Results Retrieval: Fetches detailed results from /rest/api/testops/execution/{executionId}/detailed-results when execution completes
  5. Result Display: Displays comprehensive execution summary including:
    • Test suites, scripts, and iterations
    • Pass/fail counts
    • Error messages and execution details
    • Screenshot and video URLs (if available)
  6. Task Result: Sets Azure DevOps task result based on test bot execution outcome (Succeeded/Failed)

Features

  • Bundled Dependencies: All npm dependencies are bundled into a single file, eliminating the need for npm install during deployment
  • Comprehensive Error Handling: Validates inputs and provides clear error messages
  • Detailed Reporting: Displays execution results with status icons, timing information, and failure details
  • Timeout Protection: Maximum polling time of 30 minutes to prevent indefinite waiting

Technical Details

  • Runtime: Node.js 10, 16, or 20.1
  • Bundling: Uses tsup to bundle all dependencies
  • Dependencies:
    • azure-pipelines-task-lib (bundled)
    • jwt-decode (bundled)
    • ofetch (bundled)
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft