> For the complete documentation index, see [llms.txt](https://docs.akto.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akto.io/api-security-testing/how-to/run-test.md).

# Run Test

Running security tests in Akto involves assessing specific parts of your API endpoints to assess their security posture. With Akto, you have the flexibility to run the tests instantly or schedule a single test run for a later time. This feature is particularly useful for planning future testing sessions or implementing regular tests. The Akto testing module contains 1000+ templates that you can use just out of the box.

## Prerequisites

To run tests in Akto, you must have at least one [**test role**](/api-security-testing/how-to/create-a-test-role.md) configured in your account. Without a test role, no tests can be executed — the testing engine uses test roles to define the identity (and its associated auth credentials) under which API requests are replayed during a scan.

{% hint style="info" %}
Authenticated scans deliver the best results. We strongly encourage you to set an auth token before running tests:

* **Authenticated scan (recommended):** Create an auth token and [configure it as a hard-coded auth token](/api-security-testing/how-to/create-a-test-role.md#1-hard-coded-auth-token) in your test role.
* **Unauthenticated scan:** Still create a hard-coded auth in your test role, but use a dummy header — for example, `x-dummy-auth: true`.
  {% endhint %}

## Running a Test

In the demonstration below, let's run tests on <mark style="color:red;">`/rest/products/search`</mark> endpoint within **demo\_collection**.

{% @arcade/embed url="<https://app.arcade.software/share/uH7TcfV5by6oJ1L4SAvG>" flowId="uH7TcfV5by6oJ1L4SAvG" %}

In the demonstration above, we performed tests on the <mark style="color:red;">`/rest/products/search`</mark> endpoint from the **demo\_collection** API.

### Smart Automated Testing

Check **Smart Automated Testing** in the test configuration panel to have Akto's AI agent execute the tests. See [Smart Automated Testing](/api-security-testing/concepts/smart-automated-testing.md) for details.

### Add/modify/delete headers/params

Easily add, modify, or remove headers like “x-forwarded-for” or “x-no-alarm” directly from the test configuration, without editing YAML files.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.akto.io/api-security-testing/how-to/run-test.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.
