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

# Update Test

> Update an existing Test, specified by ID

Update an existing test, specified by ID. You can modify details such as name, rate, servers, users, host\_id, region, and locustfile to adjust your load testing configuration.


## OpenAPI

````yaml PATCH /tests/{test_id}
openapi: 3.1.0
info:
  title: LoadForge API
  description: >-
    The LoadForge API provides programmatic access to create, manage, and run
    load tests on your web applications
  license:
    name: MIT
  version: 2.0.0
servers:
  - url: https://app.loadforge.com/api/v2
security:
  - bearerAuth: []
paths:
  /tests/{test_id}:
    patch:
      description: Update an existing Test, specified by ID
      parameters:
        - name: test_id
          in: path
          description: ID of test to update
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: Test data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTest'
        required: true
      responses:
        '200':
          description: Test update response
          content:
            application/json:
              schema:
                type: object
                properties:
                  test_id:
                    type: integer
                    description: ID of the updated test
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    NewTest:
      type: object
      required:
        - name
        - rate
        - servers
        - users
        - host_id
        - region
        - locustfile
      properties:
        name:
          type: string
          description: Name of the test
        rate:
          type: integer
          description: Spawn rate of the virtual users
        servers:
          type: integer
          description: Number of worker servers to launch
        users:
          type: integer
          description: Total virtual users to simulate
        host_id:
          type: integer
          description: ID of the host to test
        region:
          type: string
          description: Region code for the test
        locustfile:
          type: string
          description: The full locustfile content
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````