tstr

module
v0.0.0-...-7fcfa66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: Apache-2.0

README ΒΆ

tstr

🚧 NOTE tstr is still a work in progerss. The initial minimal set of core functionality is complete, but there are still a significant number additional features being actively worked on. Before of the first release, backwards compatibility will only be a best effort attempt and is not a guaranatee. 🚧


tstr is a test orchestration, visualization, and analysis platform.

tstr is not a testing framework, and it does not impose any patterns on how tests are written. Instead, tests are treated as black block workloads packaged up in containers that can be registered with tstr. tstr handles the scheduling, running, and collecting of results and logs allowing them to be retrieved, visualized, and analyzed from a central location.

9D114254-B2D1-41CB-9D2F-C6336BB6D6A8

There is a live demo instance of the tstr that tracks the main branch of this repository:

Features

  • Test language/framework agnostic. If you can package up the test workload as a container, tstr can orchestrate it.
  • Declarative API driven test configuration.
  • Test scheduling via cron style syntax.
  • Dynamic test runner registration and test run placement.
  • Test matrix scheduling via labels.
  • Web UI for visualization.
  • gRPC and json APIs for integration/extension (the web UI is built this way).
    • Token based api authentication and scope based authorization.

How It Works

Concepts
Test

Tests are the fundamental building block that are represented as the combination of:

  1. a black box containerized workload that returns a 0 exit code on success
  2. configuration that describes how to run the workload

The user is responsible for writing, building and publishing 1, while tstr is responsible for following 2.

The configuration consist of:

  • The description of the containerized test workload (container image, cmd, args, environment variables, timeout, etc.)
  • The set of labels (k/v pairs) that can describe the test which will be used for determining where the test runs
  • The schedule (optional) on which the test should be run
Run

Runs represent an instance of an execution of a configured test. It contains a snapshot of the configuration and labels that describe the execution and placement of the test.

Each run stores the timing (scheduled at, started at, finished at), result (pass, fail, error, unknown), logs (stdout and stderr), as well as any result data (custom extracted metadata) for the test.

Runner

Runners are the placement targets that execute test workloads. Each runner has a set of accept and reject labels selectors that are used to determine where tests can run by matching them against the configured labels of an instance of a test run.

Architecture
                                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                    β”Œβ”€β”€β”€ tstr runner β”œβ”€β”
     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                   β”‚  β””β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”œβ”€β”
     β”‚ tstr ctl β”œβ”€β”€β”€β”               β”‚    β””β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚               β”‚      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚               β”‚     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚               β”œβ”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β–Ί gRPC ──┴────►│          β”‚
β”‚ Other clients β”‚                         β”‚ tstr api β”‚
β”‚               β”œβ”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β–Ί json ───────►│          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚                     β””β”€β”€β”€β”¬β”€β”€β–²β”€β”€β”€β”˜
                    β”‚                         β”‚  β”‚
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚ tstr ui β”œβ”€β”€β”€β”˜                β”‚ Database (PostgreSQL) β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

TODO

Usage

tstr is bundled as a single binary that includes all the components.

tstr api

TODO

tstr ui

TODO

tstr run

TODO

tstr ctl

TODO

Directories ΒΆ

Path Synopsis
api
data/v1
Package datav1 is a reverse proxy.
Package datav1 is a reverse proxy.
identity/v1
Package identityv1 is a reverse proxy.
Package identityv1 is a reverse proxy.
cmd
Package db is a generated GoMock package.
Package db is a generated GoMock package.
grpc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL