> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revoengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Capture an independent native fixture run

> Captures current authoring sources and optional complete workspace/local overlays. Persists an exact test snapshot without creating a Studio session, saving Component source or activating runtime. Only fixture suites are allowed. Reuse operationId for identical capture retries. Execute each queued suite through the returned run handle; results are diagnostics, not deployment approval.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/native-tests/runs
openapi: 3.0.0
info:
  title: RevoEngine Platform API
  description: Official RevoEngine Platform API documentation.
  version: 1.7.0
  contact:
    name: Support
    email: support@revoengine.com
  termsOfService: https://docs.revoengine.com/tos
servers:
  - url: https://api.revoengine.com
    description: Production
security: []
tags:
  - name: Accounts
    description: Users, service accounts, API keys, status, and platform access.
    externalDocs:
      description: Identity and access guide
      url: https://docs.revoengine.com/operate/identity-and-access
  - name: Activity
    description: Snapshot-backed activity and version history.
    externalDocs:
      description: Observability guide
      url: https://docs.revoengine.com/operate/observability
  - name: Agent Memory
    description: Administrative access to durable Agent memory.
    externalDocs:
      description: Agent memory and workspaces guide
      url: https://docs.revoengine.com/ai/memory-and-workspaces
  - name: Agent Plugins
    description: Agent plugin definitions, synchronization, testing, and lifecycle.
    externalDocs:
      description: Agent plugins guide
      url: https://docs.revoengine.com/ai/plugins
  - name: Agent Terminals
    description: Terminal pairing, owner grants, access, and command activity.
    externalDocs:
      description: Connect a terminal guide
      url: https://docs.revoengine.com/ai/terminals
  - name: Agents
    description: >-
      Agent definitions, runs, sessions, inboxes, memory, tools, workspaces, and
      lifecycle.
    externalDocs:
      description: Autonomous Agents guide
      url: https://docs.revoengine.com/ai/agents
  - name: Assistant
    description: >-
      Assistant threads, messages, responses, goals, reports, sharing,
      attachments, and control.
    externalDocs:
      description: Assistant guide
      url: https://docs.revoengine.com/ai/assistant
  - name: Automation
    description: >-
      Jobs, templates, schedules, events, webhooks, execution history, and
      lifecycle.
    externalDocs:
      description: Automation guide
      url: https://docs.revoengine.com/operate/automation
  - name: Browser Profiles
    description: >-
      Manage browser profile metadata, access, assignments and active sessions
      without exposing website authentication state.
    externalDocs:
      description: Browser profiles and collaboration guide
      url: https://docs.revoengine.com/ai/browser
  - name: Chat
    description: Collaborative chat threads, messages, reactions, uploads, and attachments.
    externalDocs:
      description: Team Chat guide
      url: https://docs.revoengine.com/operate/chat
  - name: Component deployments
    description: >-
      Custom Node.js runtime deployment attempts, readiness, activation, and
      rollback.
    externalDocs:
      description: Custom Node.js guide
      url: https://docs.revoengine.com/build/custom-nodejs
  - name: Components
    description: Components, elements, versions, validation, activation, and lifecycle.
    externalDocs:
      description: Components guide
      url: https://docs.revoengine.com/build/components
  - name: Config
    description: Instance configuration, usage, logs, and cache administration.
    externalDocs:
      description: Instance settings guide
      url: https://docs.revoengine.com/platform/instance-settings
  - name: Database Cache
    description: Instance Database cache values and statistics.
    externalDocs:
      description: Database Cache guide
      url: https://docs.revoengine.com/operate/database-cache
  - name: Database Views
    description: Database Views, previews, refreshes, exports, and controlled data actions.
    externalDocs:
      description: Database Views guide
      url: https://docs.revoengine.com/operate/database-views
  - name: Databases
    description: Database definitions, data, audits, exports, cloning, and lifecycle.
    externalDocs:
      description: Databases guide
      url: https://docs.revoengine.com/operate/databases
  - name: Endpoints
    description: >-
      Endpoint definitions, activation, validation, generated OpenAPI, and
      statistics.
    externalDocs:
      description: Endpoints guide
      url: https://docs.revoengine.com/operate/endpoints
  - name: Files
    description: Compatibility file listing, preview, download, and deletion operations.
    externalDocs:
      description: Files compatibility guide
      url: https://docs.revoengine.com/operate/files
  - name: Groups
    description: Groups, membership, avatars, and lifecycle.
    externalDocs:
      description: Groups guide
      url: https://docs.revoengine.com/operate/groups
  - name: Instance Vault
    description: Operations in the Instance Vault Platform API domain.
    externalDocs:
      description: Secrets and Vault guide
      url: https://docs.revoengine.com/operate/secrets
  - name: Me
    description: Current user profile, keys, avatar, and session information.
    externalDocs:
      description: Authentication guide
      url: https://docs.revoengine.com/developers/authentication
  - name: Native tests
    description: Operations in the Native tests Platform API domain.
    externalDocs:
      description: Native tests guide
      url: https://docs.revoengine.com/build/native-tests
  - name: Observability
    description: Authorized execution, performance, graph, and log evidence.
    externalDocs:
      description: Observability guide
      url: https://docs.revoengine.com/operate/observability
  - name: Preferences
    description: User and instance preference values.
    externalDocs:
      description: Platform UI guide
      url: https://docs.revoengine.com/platform/ui-tour
  - name: Role Groups
    description: Role groups, members, assigned roles, and lifecycle.
    externalDocs:
      description: Permissions guide
      url: https://docs.revoengine.com/operate/permissions
  - name: Roles
    description: Available platform roles and role details.
    externalDocs:
      description: Permissions guide
      url: https://docs.revoengine.com/operate/permissions
  - name: Search
    description: Cross-domain search over objects visible to the caller.
    externalDocs:
      description: Search and discovery guide
      url: https://docs.revoengine.com/platform/search
  - name: Secrets
    description: >-
      Secret definitions, revision history, explicit rotation, activation,
      reveal, disable, and destruction.
    externalDocs:
      description: Secrets guide
      url: https://docs.revoengine.com/operate/secrets
  - name: Share
    description: >-
      Short-lived authenticated links to supported application routes and grid
      state.
    externalDocs:
      description: Platform API share-link guide
      url: >-
        https://docs.revoengine.com/developers/platform-api#share-application-context
  - name: Storage
    description: >-
      Storage workspaces, folders, objects, upload sessions, signed access, and
      lifecycle.
    externalDocs:
      description: Storage guide
      url: https://docs.revoengine.com/operate/storage
  - name: Studio
    description: >-
      Manage durable Studio coding sessions, participants, shared discussion,
      tests, review and explicitly activated releases. Available only on enabled
      instances.
    externalDocs:
      description: Studio sessions guide
      url: https://docs.revoengine.com/build/studio-sessions
externalDocs:
  description: Documentation
  url: https://docs.revoengine.com
paths:
  /api/v1/native-tests/runs:
    post:
      tags:
        - Native tests
      summary: Capture an independent native fixture run
      description: >-
        Captures current authoring sources and optional complete workspace/local
        overlays. Persists an exact test snapshot without creating a Studio
        session, saving Component source or activating runtime. Only fixture
        suites are allowed. Reuse operationId for identical capture retries.
        Execute each queued suite through the returned run handle; results are
        diagnostics, not deployment approval.
      operationId: NativeTestsController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NativeTestRunDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NativeTestExecutionDto'
      security:
        - bearer: []
components:
  schemas:
    NativeTestRunDto:
      type: object
      properties:
        operationId:
          type: string
          description: >-
            Idempotent capture identity. Retry identical input with the same
            UUID.
        testComponentNames:
          minItems: 1
          maxItems: 20
          description: >-
            Native test Component names. Each Component contains a suite of
            named test.case cases.
          type: array
          items:
            type: string
        components:
          maxItems: 100
          description: >-
            Complete workspace/local source overlays by name, including changed
            targets, libraries and test fixtures. Never persisted as Component
            source.
          type: array
          items:
            $ref: '#/components/schemas/NativeTestComponentDto'
        timeout:
          type: integer
          minimum: 1
          maximum: 60
          default: 10
          description: Per-suite isolated execution deadline in seconds.
      required:
        - operationId
        - testComponentNames
    NativeTestExecutionDto:
      type: object
      properties:
        runId:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - QUEUED
            - RUNNING
            - PASSED
            - FAILED
            - CANCELLED
            - ABORTED
            - UNAVAILABLE
            - INCOMPLETE
            - STALE
        createdAt:
          type: string
          format: date-time
        completedAt:
          format: date-time
          type: string
          nullable: true
        snapshotDigest:
          type: string
        runs:
          type: array
          items:
            $ref: '#/components/schemas/NativeTestResultDto'
      required:
        - runId
        - status
        - createdAt
        - completedAt
        - snapshotDigest
        - runs
    NativeTestComponentDto:
      type: object
      properties:
        testConfig:
          nullable: true
          description: >-
            Native test configuration. Only CODE_JS_TEST and CODE_TS_TEST accept
            it.
          type: object
          allOf:
            - $ref: '#/components/schemas/ComponentTestConfigDto'
        name:
          type: string
          description: >-
            Display name. For CODE_JS_LIB and CODE_TS_LIB, it must be a
            JavaScript identifier (letters/underscore first, then
            letters/digits/underscore). At most one active, non-deleted library
            of either type may have this name; inspect existing active libraries
            before creating an active one. Inactive libraries may share a name.
          minLength: 1
          maxLength: 60
        category:
          type: string
          nullable: true
          description: >-
            Optional category using only ASCII letters, digits and underscores.
            Pass null to leave it empty.
          pattern: ^[a-zA-Z0-9_]*$
          maxLength: 32
        desc:
          type: string
          nullable: true
          description: Optional component description. Pass null to leave it empty.
        metadata:
          type: object
          nullable: true
          description: >-
            Optional resource metadata. Values may use any JSON type. Maximum 16
            KiB and 64 top-level keys. Top-level keys starting with "__" are
            reserved for backend use.
        type:
          type: string
          description: >-
            Type of component must be one of:
            CODE_JS,CODE_TS,CODE_JS_TEST,CODE_TS_TEST,CODE_JS_LIB,CODE_TS_LIB,JSON_VALIDATOR,CUSTOM_NODEJS.
          enum:
            - CODE_JS
            - CODE_TS
            - CODE_JS_TEST
            - CODE_TS_TEST
            - CODE_JS_LIB
            - CODE_TS_LIB
            - JSON_VALIDATOR
            - CUSTOM_NODEJS
        active:
          type: boolean
          description: >-
            Activate upon creation. If type is CODE_JS_LIB or CODE_TS_LIB and
            active is true, no other active, non-deleted library of either
            library type may have the same name.
        elements:
          minItems: 1
          maxItems: 100
          description: >-
            Complete transient component source. Instance-specific identifiers
            are not accepted.
          type: array
          items:
            $ref: '#/components/schemas/NativeTestElementDto'
        baseName:
          type: string
          minLength: 1
          maxLength: 60
          description: >-
            Observed original name when the transient source renames an existing
            component.
        baseVersion:
          type: integer
          minimum: 0
          description: >-
            Optional observed target-instance source version. A mismatch rejects
            the whole capture before execution.
        baseDigest:
          type: string
          description: >-
            Optional observed portable component digest. A mismatch rejects the
            entire capture.
      required:
        - name
        - type
        - active
        - elements
    NativeTestResultDto:
      type: object
      properties:
        testRunId:
          type: string
          format: uuid
        testComponentId:
          type: string
          format: uuid
          description: >-
            Host captured identity. Suite selection and source authoring use
            component names.
        testComponentName:
          type: string
        status:
          type: string
          enum:
            - QUEUED
            - RUNNING
            - PASSED
            - FAILED
            - CANCELLED
            - ABORTED
            - UNAVAILABLE
            - INCOMPLETE
            - STALE
        createdAt:
          type: string
          format: date-time
        completedAt:
          format: date-time
          type: string
          nullable: true
        durationMs:
          type: number
        sourceDigest:
          type: string
        assertions:
          type: array
          items:
            $ref: '#/components/schemas/NativeTestAssertionDto'
        cases:
          type: array
          items:
            $ref: '#/components/schemas/NativeTestCaseDto'
        result:
          type: object
          nullable: true
          description: >-
            Host-owned exact source manifest and result evidence; never
            deployment approval.
        error:
          type: object
          nullable: true
      required:
        - testRunId
        - testComponentId
        - testComponentName
        - status
        - createdAt
        - completedAt
        - sourceDigest
        - assertions
        - cases
        - result
        - error
    ComponentTestConfigDto:
      type: object
      properties:
        mode:
          type: string
          enum:
            - fixture
            - integration
          default: fixture
        targets:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 60
          maxItems: 100
          description: >-
            Component names covered by this test. Execution resolves names
            exclusively against the captured source manifest.
        fixtures:
          type: object
          description: Named JSON fixtures. These are input data, never test results.
      required:
        - mode
        - targets
    NativeTestElementDto:
      type: object
      properties:
        key:
          type: string
          description: >-
            Unique element key. CODE_JS, CODE_TS, CODE_JS_LIB, and CODE_TS_LIB
            keys must be valid JavaScript identifiers and cannot be
            JavaScript/TypeScript reserved words. The permanent @default element
            cannot be renamed, deleted or replaced; its source remains editable.
            Only CODE_JS_LIB and CODE_TS_LIB additionally accept the reserved
            technical key @default: its named exports are available as
            lib.LibraryName.member. An ordinary DEFAULT key remains a regular
            node.
          minLength: 1
          maxLength: 32
        desc:
          type: string
          nullable: true
          description: >-
            Optional representation description, for example Swagger details.
            Pass null to leave it empty.
          maxLength: 1000
        details:
          type: string
          description: >-
            Element source/body. Required whenever an explicit element is
            supplied.
        metadata:
          type: object
          nullable: true
          description: >-
            Optional element metadata. Top-level keys starting with "__" are
            reserved for backend use.
        hidden:
          type: boolean
          nullable: true
          description: >-
            Hide supporting or large-output elements from normal result
            projection. Omit or pass null to default to false.
        order:
          type: number
          description: Order of the element (must be unique).
      required:
        - key
        - details
        - order
    NativeTestAssertionDto:
      type: object
      properties:
        name:
          type: string
        passed:
          type: boolean
        expected:
          type: object
        actual:
          type: object
        message:
          type: string
      required:
        - name
        - passed
    NativeTestCaseDto:
      type: object
      properties:
        name:
          type: string
        status:
          type: string
          enum:
            - RUNNING
            - PASSED
            - FAILED
            - INCOMPLETE
            - SKIPPED
        assertions:
          type: number
        error:
          type: string
      required:
        - name
        - status
        - assertions
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      description: Bearer JWT token or API Key (sk-*).
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.