# Schrödinger

> Note: This is a partial English translation of https://internal.pingcap.net/confluence/display/EE/Schrodinger

Schrödinger is a orcestrator for testing environments. It manages different environments, run test sets, and report outputs visually.

It supports all the integrated test cases used by TiDB, PD, and TiKV tools.

Details: https://internal.pingcap.net/confluence/display/EE/Schrodinger

## Usage

### Dashborad
> [**Summary**](https://schrodinger.pingcap.net/#/summary)
In summary you can get an overview of how many experiments have run in last few weeks
![Summary](docs/assets/dashboard.png)

### Creating a Test Case

> [**Case Dashboard**](https://schrodinger.pingcap.net/#/testcase)

First you need to write a test. You can refer to https://github.com/pingcap/schrodinger-test, particularly in the `nemesis/random` test. Create a PR to the repository with that test case. (You can request a review from @zhouqiang-cl or @cwen0.)

Add the case at https://schrodinger.pingcap.net/#/testcase, using the interface to select various parameters and configurations. It will report `DONE` if it was successful, `ERROR` if the case fails to compile.

![Creating a Case](docs/assets/configure-test.png)

### Creating a Box

> [**Scene Dashboard**](https://schrodinger.pingcap.net/#/box)

To create a box. your can trigger it to run experiments automatic or Manual. It contains all configure to run a experiment such as tidb/tikv/pd version. which node to run etc..

![Creating a Box](docs/assets/configure-box.png)

## Overall Design

Logically speaking, Schrödinger creates test clusters to run various test cases against. Clusters and the test cases form a test 'box'. A mission is composed of multiple test cases.

Each case and cluster is permitted its own configuration.

The system is mainly divided into the following components:

* **Manager Frontend**: Graphical user interface, mission creation
* **Manager**: The central hub and controller of the entire Schrödinger system.
* **Agent**: A process management tool which is run in the containers created by the manager. Communicates with the Manager and controls the managed TiDB, PD, and TiKV instances.
* **Bot**: Bots fulfilling various roles, such as build bots, replay bots, and Slack/Jira bots.
* **Operator**: A cluster manipulator.
* **Proxy**: Allows the Operator to communicate with the cluster to the Agents and Bots in other isolation zones.
* **Mortem**: Analysis tidb panic log and leak checks