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

# Quickstart

> Welcome to Playmatic!

Get started with Playmatic in just a few minutes. This guide will walk you through creating your first working tests and running them locally.

## Before you begin

Prerequisites:

* A web application to test
* GitHub repository of the web application
* Slack

## Step 1: Create an account on the Playmatic dashboard

Navigate to [https://www.playmatic.ai/login](https://www.playmatic.ai/login) and create an account.

## Step 2: Connect GitHub

Use the link on the dashboard to connect your GitHub and choose a working directory for the Playmatic agent.

<Tip>If you have a monorepo, choose the parent directory so Playmatic has the context of the full codebase when working.</Tip>

## Step 3: Connect Slack

Use the link on the dashboard to connect Playmatic to your workspace.

Now, invite Playmatic into a channel so you can start interacting with it. You can type `/invite @playmatic` in the desired channel.

## Step 4: Create your first tests

Let's start with a simple ask to get coverage on your core flows.

```
> @playmatic write some tests for my core flows
```

You can also ask more specific questions:

```
> @playmatic write a test for my login flow
```

```
> @playmatic write some tests for the API key creation flows
```

Playmatic will now:

1. Read the existing files in your repo
2. Create a test plan with test scenarios covering happy and unhappy paths
3. Ask for approval
4. Ask for help on any prerequisites required to run the test
5. Write and validate tests using its own machine

## Step 5: Review the tests

After a few loops, Playmatic will push a PR for all the working tests, and a draft PR for the tests that need help fixing.

If the Playmatic agent discovers any bugs while building the tests, it will report them in the same Slack thread.

## Step 6: Run the tests

To verify that the test works, we'll run the test locally.

Pull down the branch that Playmatic created for the working tests.

```bash theme={null}
git checkout <branch_name>
```

Navigate to the Playmatic directory inside your app

```bash theme={null}
cd playmatic
```

Install the dependencies

```bash theme={null}
pnpm install
```

Install Playwright and the required dependencies:

```bash theme={null}
npx playwright install --with-deps chromium
```

Go to your Playmatic dashboard → Settings and create an API key. Then, add the Playmatic key to your runtime environment:

```bash theme={null}
export PLAYMATIC_API_KEY=YOUR_API_KEY
```

Run the tests using Playwright:

```bash theme={null}
# Run the tests
npx playwright test

# See the report
npx playwright show-report
```

Voila! You have your first working tests, automatically built and validated by AI!

## Pro Tips for beginners

<AccordionGroup>
  <Accordion title="Be specific with your requests">
    If you have a clear idea of the flows that you want the agent to write tests for, be specific.

    Instead of: `@playmatic test the app`.

    Try: `@playmatic test the API key flows in the settings`.
  </Accordion>

  <Accordion title="Provide context to help testing">
    If you believe that the agent might need specific setup or credentials/variables to be able to write and run tests, provide this to the agent.

    `@playmatic, use the API endpoints from the services folder to mock responses.`
  </Accordion>

  <Accordion title="Use step-by-step instructions">
    For complex flows, break down the test into steps.

    ```
    @playmatic, test the DM flow between two users:
    1. Login with James_send account
    2. Send a message to James_receive
    3. Login to James_receive account 
    4. Verify that you see a new message from james_test_send (indicated by the red dot)
    5. Open the message 
    6. Verify that the red dot disappears on that same message in the side pane
    ```
  </Accordion>
</AccordionGroup>

## Next Steps

Now that you've learned the basics, explore how Playmatic manages environments and uses AI actions to create reliable tests.

<Columns>
  <Card title="Environment Management" icon="play" href="/test-development/environment-management">
    Learn how to manage test data and variables across different environments.
  </Card>

  <Card title="AI Actions" icon="sparkles" href="/test-development/ai-actions">
    Learn how to augment Playwright tests with AI actions.
  </Card>
</Columns>
