Salesforce Automation · Capability

Salesforce Tooling API — Testing

Salesforce Tooling API — Testing. 2 operations. Lead operation: Run Apex tests asynchronously. Self-contained Naftiko capability covering one Salesforce Automation business surface.

Run with Naftiko Salesforce AutomationTesting

What You Can Do

POST
Runtestsasync — Run Apex tests asynchronously
/v1/runtestsasynchronous
POST
Runtestssync — Run Apex tests synchronously
/v1/runtestssynchronous

MCP Tools

run-apex-tests-asynchronously

Run Apex tests asynchronously

run-apex-tests-synchronously

Run Apex tests synchronously

Capability Spec

salesforce-tooling-testing.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Salesforce Tooling API — Testing
  description: 'Salesforce Tooling API — Testing. 2 operations. Lead operation: Run Apex tests asynchronously. Self-contained
    Naftiko capability covering one Salesforce Automation business surface.'
  tags:
  - Salesforce Automation
  - Testing
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SALESFORCE_AUTOMATION_API_KEY: SALESFORCE_AUTOMATION_API_KEY
capability:
  consumes:
  - type: http
    namespace: salesforce-tooling-testing
    baseUri: https://{instance}.salesforce.com/services/data/v63.0/tooling
    description: Salesforce Tooling API — Testing business capability. Self-contained, no shared references.
    resources:
    - name: runTestsAsynchronous
      path: /runTestsAsynchronous
      operations:
      - name: runtestsasync
        method: POST
        description: Run Apex tests asynchronously
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: runTestsSynchronous
      path: /runTestsSynchronous
      operations:
      - name: runtestssync
        method: POST
        description: Run Apex tests synchronously
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.SALESFORCE_AUTOMATION_API_KEY}}'
  exposes:
  - type: rest
    namespace: salesforce-tooling-testing-rest
    port: 8080
    description: REST adapter for Salesforce Tooling API — Testing. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/runtestsasynchronous
      name: runtestsasynchronous
      description: REST surface for runTestsAsynchronous.
      operations:
      - method: POST
        name: runtestsasync
        description: Run Apex tests asynchronously
        call: salesforce-tooling-testing.runtestsasync
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/runtestssynchronous
      name: runtestssynchronous
      description: REST surface for runTestsSynchronous.
      operations:
      - method: POST
        name: runtestssync
        description: Run Apex tests synchronously
        call: salesforce-tooling-testing.runtestssync
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: salesforce-tooling-testing-mcp
    port: 9090
    transport: http
    description: MCP adapter for Salesforce Tooling API — Testing. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: run-apex-tests-asynchronously
      description: Run Apex tests asynchronously
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: salesforce-tooling-testing.runtestsasync
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: run-apex-tests-synchronously
      description: Run Apex tests synchronously
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: salesforce-tooling-testing.runtestssync
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.