# Test your product with the QA tester

> Add places to test, write tests, schedule checks and read the reports of the QA tester.

Tests answers one question: is everything working? The QA tester checks your product like a customer, at the places
that you add, and Troopy keeps the proof. This page tells how to add a place, write tests, schedule checks and read a
report.

## Before you begin

- Tests is a part of the Engineering product. A person sees it only when it has Engineering.
- The QA tester runs the tests. Without one, the page shows **Hire the QA tester**. A check that only opens a page needs
  no QA tester.
- Owners and admins add and change the places to test.

## Add a place to test

A place is your product at one address: **Production**, your live product, or **Staging**.

1. On **Tests**, select **Add a place to test**.
2. Give it a **Name** and its **Address**, an https address of its own.
3. Pick **Where**: **Production** or **Staging**.
4. Under **Test accounts**, give each test account a label, like admin, and pick its login from the Vault.
5. Select **Add the place**.

On Production, the QA tester only looks and checks. On Staging, an owner or admin can turn on **Let the QA tester press
buttons that change data**. The QA tester never pays.

Tests name a test account by its label. Add the login to the Vault first. See
[Keep logins and secrets in the Vault](/docs/vault).

## Write a test

A test is the steps that the QA tester follows and checks, like a customer.

1. Open **Test library**, then **Write your first test**, or the button for a new test.
2. Type its **Title**, such as "The checkout", and **What it is for**.
3. Write each step: **What a customer does**, such as "open the pricing page", and **What must show**, such as "the page
   says Pro".
4. Pick the test account that it **Signs in with**, if it signs in.
5. Turn on **Safe for Production** when no step changes data. Then it can run on your live product.
6. Turn on **Main path** for the tests of the main path of your product.
7. Select **Add the test**.

The QA tester also proposes tests. A proposed test shows **Proposed**: select **Make it active** to use it.

## Run tests

- **Look now** on a place opens it and takes a picture, with no AI.
- **Start** runs the tests that you pick at a place: **Every active test**, or **Only the tests of the main path**.
- The QA tester can also explore a place by itself.

A run waits for a free place: an organization runs 2 test runs at one time. **Cancel the run** stops it.

A test that passed at a place replays there with no AI. Troopy follows how the QA tester passed it before. Where a
replay stops, the QA tester takes over in the same tab.

## Read a report

Open a run from **Latest test runs**. The report shows each part with each check, the pictures and the problems.

| Result of a check | What it means                                                                           |
| ----------------- | --------------------------------------------------------------------------------------- |
| **Passed**        | The proof shows it: **Seen in the browser**, **In a picture**, or **Read in the code**. |
| **Failed**        | What must show did not show.                                                            |
| **Couldn't test** | The QA tester could not do the step. The report says why.                               |
| **Not checked**   | The run stopped before the check.                                                       |

Each problem has a weight: **Blocker**, **Major** or **Minor**. Select **Make a bug ticket** to make a ticket of it, or
**Dismiss** it.

## Schedule checks

Owners and admins give a place a schedule: **Every hour**, **Every day** or **Every week**, or **Only when someone asks**.

- A check runs the main path, or every active test.
- Without a QA tester, a check only looks whether the place loads.
- A failed check shows the place in **Needs you** until a check passes.
- The QA tester says in the troop chat when the checks begin to fail and when they pass again, once a day at most.

Scheduled checks and checks after a release start the QA tester 12 times a day at most.

## Settings of Tests

**Settings** > **Tests** has 4 switches, under **After a test**:

| Setting                                         | What it does                                                                                            |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| **Comment on pull requests**                    | After it tests a ticket, the QA tester puts its report on the pull request, in a private repo only.     |
| **Make a bug ticket when checks begin to fail** | Troopy makes a bug ticket in the backlog. New failures go on it as comments while it is open.           |
| **Check Production after each release**         | Troopy checks the main path and the tests of the released tickets, once the release reaches Production. |
| **Keep the checks of a ticket as a test**       | When a ticket is released, the QA tester proposes a test from its checks. You make it active.           |

The QA tester never approves or merges a pull request.

## How long Troopy keeps runs

Troopy deletes a test run 90 days after it ends, and the pictures of a passed run after 7 days.

## Related

- [Ship code with engineering tickets](/docs/engineering)
- [Catch the errors of your apps](/docs/incidents)
- [Keep logins and secrets in the Vault](/docs/vault)
- [GitHub](/docs/apps/github)
