Testground
GitHubGo SDKInfra
master
master
  • README
  • Table of contents
    • What is Testground?
      • Community
    • Concepts and architecture
      • Test plans and test cases
      • Daemon and client
      • Synchronization service
      • Networking
      • Sidecar
      • Builders
      • Runners
      • Runtime environment (runenv)
      • Client-Server communication
    • Getting started
    • Writing test plans
      • Quick start
      • Understanding the test plan manifest
      • Parameters and test cases
      • Keeping instances in sync
      • Communication between instances
      • Observability, assets and metrics
    • Managing test plans
    • Running test plans
    • Traffic shaping
    • Analyzing test run results
      • Capturing profiles
    • Debugging test plans
    • Docker Settings
    • Featured projects
  • Runner library
    • local:exec
    • local:docker
      • System overview
      • Runner flags
      • Troubleshooting
    • cluster:k8s
      • System overview
      • How to create a Kubernetes cluster for Testground
      • Monitoring and Observability
      • Understanding Testground performance on Kubernetes
      • Troubleshooting
  • Builder Library
    • docker:go
    • exec:go
    • docker:generic
Powered by GitBook
On this page
  • Build
  • Run
  • Composition JSON
  • Collect outputs
  • Terminate Jobs
  • Healthcheck
  1. Table of contents
  2. Concepts and architecture

Client-Server communication

This is an advanced section for those curious about the communication between client and server. This section is not needed to use Testground, but to understand the protocol between client and server.

Build

POST /build

Build sends a mime/multipart `build` request to the daemon. A build request comprises the following parts:

  • Part 1 (Content-Type: application/json): composition json (see below)

  • Part 2 (Content-Type: application/zip): test plan source

  • Part 3 (optional, Content-Type: application/zip): linked sdk

The request is the same kind multipart mime message archive your email administrator knows and loves so well. With this archive in hand, the plan is POST'ed the testground daemon.

Run

POST /run

A Run request consists of a composition json (see below)

Composition JSON

{
  "composition": {
    "metadata": {
      "name": string,
      "author": string,
    },
    "global": {
      "plan": string,
      "case": string,
      "total_instances": int,
      "builder": string,
      "build_config": object,
      "runner": string,
      "run_config": string,
    },
    "groups": [
      "id": string,
      "resources": {
        "memory": string,
        "cpu": string,
      },
      "instances": {
        "count": int,
        "percentage": float,
      },
      "build":
      "run":
    ],
  },
}

Collect outputs

POST /outputs

{
  "runner": string,
  "run_id": string,
}

Terminate Jobs

POST /terminate

{
  "runner": string,
}

Healthcheck

POST /healthcheck

{
  "runner": string,
  "fix": bool,
}
PreviousRuntime environment (runenv)NextGetting started

Last updated 2 years ago