# Running Automated Tests

## Running the Functional Tests

Run the following commands in the `elentra-1x-api` directory.

* Running all the tests:

```bash
composer test:unit
```

* Testing all the tests for a specific class:

```bash
composer test:unit tests/Functional/Portfolio/Http/PortfolioControllerTest.php
```

* Alternatively, run all functional tests for a specific controller by typing the name of the test class. This will run all unit test classes matching the specified pattern.

```bash
composer test:unit:single PortfolioController
```

* Running a single functional test, specify the method name:

```bash
composer test:unit:single portfolio_get_method_groups_returns_200
```


---

# 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.elentra.org/api/automated-testing/getting-started/running-automated-tests.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.
