> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://tester.army/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://tester.army/_mcp/server.

# Get a test

GET https://tester.army/api/v1/tests/{testId}

Get a single structured test definition, including the groups it belongs to.

Reference: https://tester.army/docs/api-reference/tester-army-api/tests/get-a-test

## Authentication

- `Authorization` header (bearer token, required) — API key authentication using Bearer token format

## Request

### Path parameters

- `testId` (string, required) — Test ID

## Response

### 200

Test details

- `id` (string, required)
- `steps` (list of object or object or object or object or object or object or object, required)
  - object
    - `title` (string, required)
    - `type` (enum, required)
      - Allowed values: `act`
    - `disabled` (boolean, optional) — When true, the step stays saved on the test but is skipped during runs.
  - object
    - `title` (string, required)
    - `type` (enum, required)
      - Allowed values: `assert`
    - `disabled` (boolean, optional) — When true, the step stays saved on the test but is skipped during runs.
  - object
    - `title` (string, required)
    - `type` (enum, required)
      - Allowed values: `login`
    - `credentialId` (string, optional)
    - `temporaryEmail` (boolean, optional)
    - `disabled` (boolean, optional) — When true, the step stays saved on the test but is skipped during runs.
  - object
    - `title` (string, required)
    - `type` (enum, required)
      - Allowed values: `files`
    - `fileIds` (list of string, required)
    - `disabled` (boolean, optional) — When true, the step stays saved on the test but is skipped during runs.
  - object
    - `type` (enum, required)
      - Allowed values: `screenshot`
    - `title` (string, optional)
    - `disabled` (boolean, optional) — When true, the step stays saved on the test but is skipped during runs.
  - object
    - `type` (enum, required)
      - Allowed values: `javascript`
    - `code` (string, required) — JavaScript run in the browser page. Runs as an awaited function body; passes if it completes without throwing (returns nothing or \{ success: true }) and fails if it returns \{ success: false, reason } or throws. Web tests only.
    - `title` (string, optional)
    - `disabled` (boolean, optional) — When true, the step stays saved on the test but is skipped during runs.
  - object
    - `type` (enum, required)
      - Allowed values: `microphone`
    - `fileId` (string, required) — Project file ID (UUID) of the audio file (e.g. MP3) to play through the microphone. Empty string marks an unconfigured draft that must have a file attached before the test runs.
    - `mode` (enum, required) — blocking: the agent waits for playback to finish before continuing. loop: playback repeats until the run ends and the agent continues immediately. Web tests only.
      - Allowed values: `blocking`, `loop`
    - `title` (string, optional)
    - `disabled` (boolean, optional) — When true, the step stays saved on the test but is skipped during runs.
- `title` (string, required)
- `createdAt` (datetime, optional)
- `description` (string, optional, nullable)
- `enabled` (boolean, optional)
- `groups` (list of object, optional)
  - `id` (string, required)
  - `name` (string, required)
  - `isDefault` (boolean, required)
- `platform` (enum, optional)
  - Allowed values: `web`, `mobile`
- `projectId` (string, optional)
- `projectName` (string, optional)
- `projectUrl` (string, optional, nullable)
- `settings` (object, optional)
  - `executionMode` (enum, optional) — deep uses a higher-effort model for complex steps.
    - Allowed values: `fast`, `deep`
  - `browserRegion` (enum, optional, nullable) — Per-test proxy exit region. null falls back to the project's region.
    - Allowed values: `eu`, `us`
  - `simulatorRegion` (enum, optional) — Region the simulator or emulator runs in. Mobile tests only.
    - Allowed values: `eu-north1`, `us-west1`
  - `viewport` (enum, optional, nullable) — Browser viewport preset: desktop (1280x800), desktop-hd (1920x1080), mobile (390x844), tablet (768x1024). null restores the default. Web tests only.
    - Allowed values: `desktop`, `desktop-hd`, `mobile`, `tablet`
  - `webSearchEnabled` (boolean, optional) — Allow the test to use internet search for factual checks.
  - `prepGroupId` (string, optional, nullable) — Group whose preparation test a solo run of this test uses.
- `updatedAt` (datetime, optional)

## Examples

**Response**

```json
{
  "id": "string",
  "steps": [
    {
      "title": "string",
      "type": "act",
      "disabled": true
    }
  ],
  "title": "string",
  "createdAt": "2024-01-15T09:30:00Z",
  "description": "string",
  "enabled": true,
  "groups": [
    {
      "id": "string",
      "name": "string",
      "isDefault": true
    }
  ],
  "platform": "web",
  "projectId": "string",
  "projectName": "string",
  "projectUrl": "string",
  "settings": {
    "executionMode": "fast",
    "browserRegion": "eu",
    "simulatorRegion": "eu-north1",
    "viewport": "desktop",
    "webSearchEnabled": true,
    "prepGroupId": "string"
  },
  "updatedAt": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://tester.army/api/v1/tests/testId"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://tester.army/api/v1/tests/testId';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://tester.army/api/v1/tests/testId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://tester.army/api/v1/tests/testId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://tester.army/api/v1/tests/testId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://tester.army/api/v1/tests/testId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://tester.army/api/v1/tests/testId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://tester.army/api/v1/tests/testId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```