# Run Tests in Parallel

## Simple CLI

Pylenium comes with <mark style="color:yellow;">**pytest**</mark> and the <mark style="color:yellow;">**pytest-xdist**</mark> plugin to run tests concurrently. All you need to do is use the `-n [NUMBER]` option when running the tests in the CLI.

{% code title="Terminal" %}

```bash
# run two tests in parallel
pytest tests -n 2
```

{% endcode %}

{% hint style="success" %}
&#x20;Pylenium is already designed to scale in parallel with or without containers
{% endhint %}

## Configure the IDE

Most IDEs will allow you to configure your Test File or Test Run with additional arguments.

For example, in PyCharm, you can:

* Open **Run** in the Top Menu
* Select **Edit Configurations**
* Then add `-n 2` to the **Additional Arguments** field

{% hint style="info" %}
That allows you to Run and Debug tests while still having 2 run at a time
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pylenium.io/guides/run-tests-in-parallel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
