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

# Creating a Test

> Learn how to set up and configure a test in LoadForge.

LoadForge tests are designed to be **repeatable and configurable** for consistent performance testing of your service. You specify the **host, load parameters, and target performance metrics**, and can trigger a run at any time.

## Test Examples

LoadForge provides several ways to create test scripts:

* **Copy examples** from our [directory](https://loadforge.com/directory).
* **Use the test wizard** to generate a script automatically.
* **Upload a browser recording** in HAR format.

## Creating a Test

To create a new test, go to the **Tests** menu and click **"Create New Test"**. You will be asked to provide the following key parameters:

### Name of Test

A descriptive name to help you identify the test, such as **"MyWebsite Submission API"** or **"Staging Server Load Test"**.

### Servers to Launch

The number of cloud instances (workers) LoadForge will create for your test. These are launched and destroyed automatically.

* **Each worker can handle approximately 10,000 virtual users.**
* LoadForge always launches a **controller** instance in addition to the workers.

### Users to Simulate

The total number of virtual users across all test workers. These users simulate real traffic by making requests based on the defined test script.

* Users are divided among the worker nodes.
* User behavior is influenced by the **`wait_time`** setting in the test script.

**Default wait time setting:**

```python theme={null}
wait_time = between(5, 9)
```

This setting makes each virtual user wait **5 to 9 seconds** before making the next request, simulating realistic browsing behavior.

### Spawn Rate of Users

How quickly users are introduced into the test. Scaling too fast may overload the server unrealistically. We recommend setting the spawn rate to **2-5% of the total user count per second**.

### Host

Select the **validated host** that the test will run against. The selected host determines the default base URL for all relative requests (e.g., `/test` vs. `https://your.host/test`).

<Note>
  If your test requires multiple hosts, ensure they are all verified. LoadForge will allow full domain names for any Hosts that you have added.
</Note>

### Region

Choose where to run the test from. This helps evaluate **latency and performance from different geographic locations**.

Available test regions:

* **New York**
* **San Francisco**
* **London**
* **Amsterdam**
* **Singapore**
* **France**
* **Toronto**
* **Bangalore**

### Test Script (Locustfile)

Advanced users can customize their test script (Locustfile). The default script simply requests the index page of your site, but you can define **user workflows**, **API requests**, and **custom scenarios**. See our [Locustfile documentation](#) for more details.

## Performance Targets & Test Passing Criteria

To help assess performance, LoadForge allows you to define **pass/fail conditions** based on:

### **Apdex Target Response Time** (milliseconds)

Defines the response time threshold for an acceptable user experience. Lower values indicate stricter performance expectations.

### **P95 Target Response Time** (milliseconds)

The response time under which **95% of all requests** should complete. This helps detect **outliers and performance degradation**.

### **Error Rate Target** (percentage)

The maximum allowed failure rate before the test is considered **failed**. Any errors beyond this threshold will trigger a failure notification.

These metrics ensure that test results are **actionable** by providing **clear benchmarks** for success or failure.

## Running the Test

Once all parameters are configured, **click "Run"**. Before execution, LoadForge will:

* Show the **estimated resource usage**.
* Provide a **cost estimate** (if using your own cloud provider).
* Deploy the required servers automatically.

## Next Steps

After the test completes, review the performance reports and refine your approach.

<CardGroup cols={2}>
  <Card title="Run Results" icon="chart-mixed" href="/runs/run-results">
    Interpret response times, throughput, error rates, and pass/fail thresholds
  </Card>

  <Card title="Compare Runs" icon="magnifying-glass-chart" href="/runs/comparing-runs">
    Track improvements and detect regressions across test runs
  </Card>

  <Card title="Schedule Tests" icon="clock" href="/tests/scheduling">
    Automate recurring tests with cron expressions
  </Card>

  <Card title="Script Examples" icon="code" href="/examples/overview">
    Browse ready-to-use scripts for advanced testing scenarios
  </Card>
</CardGroup>
