---
name: TestRunResult
last_updated: 2026-11-16T22:19:01Z
inherits:
  - Object
type: class
memory_category: Instances
tags:
  - NotCreatable
  - NotReplicated
summary: "The outcome of a test run started by TestService:RunTestsAsync()."
---

# Class: TestRunResult

> The outcome of a test run started by [TestService:RunTestsAsync()](/docs/reference/engine/classes/TestService.md).

## Description

A `TestRunResult` is returned by [TestService:RunTestsAsync()](/docs/reference/engine/classes/TestService.md) when a
run finishes. [Status](/docs/reference/engine/classes/TestRunResult.md) is the outcome of the whole
run, the counts say how many tests ended each way, and
[GetTests()](/docs/reference/engine/classes/TestRunResult.md) returns a [TestResult](/docs/reference/engine/classes/TestResult.md) for
each test.

A `TestRunResult` isn't an [Instance](/docs/reference/engine/classes/Instance.md) and can't be parented.

```lua
local TestService = game:GetService("TestService")

local result = TestService:RunTestsAsync()
print(result.Summary)
if result.Status ~= Enum.TestRunStatus.Pass then
	for _, test in result:GetTests() do
		if test.Status ~= Enum.TestCaseStatus.Pass and test.Status ~= Enum.TestCaseStatus.Skipped then
			warn(`{test.TestId}: {test.Status.Name}`)
		end
	end
end
```

## Properties

### Property: TestRunResult.Duration

```json
{
  "type": "double",
  "access": "ReadWrite",
  "security": {
    "read": "None",
    "write": "None"
  },
  "serialization": {
    "can_load": false,
    "can_save": true
  },
  "thread_safety": "ReadSafe",
  "category": "Data"
}
```

How long the whole run took, in seconds, from when
[TestService:RunTestsAsync()](/docs/reference/engine/classes/TestService.md) started it until its last test
finished.

### Property: TestRunResult.Failed

```json
{
  "type": "int",
  "access": "ReadWrite",
  "security": {
    "read": "None",
    "write": "None"
  },
  "serialization": {
    "can_load": false,
    "can_save": true
  },
  "thread_safety": "ReadSafe",
  "category": "Data"
}
```

The number of tests whose status is [TestCaseStatus.Fail](/docs/reference/engine/enums/TestCaseStatus.md) or
[TestCaseStatus.TimedOut](/docs/reference/engine/enums/TestCaseStatus.md).

### Property: TestRunResult.Passed

```json
{
  "type": "int",
  "access": "ReadWrite",
  "security": {
    "read": "None",
    "write": "None"
  },
  "serialization": {
    "can_load": false,
    "can_save": true
  },
  "thread_safety": "ReadSafe",
  "category": "Data"
}
```

The number of tests whose status is [TestCaseStatus.Pass](/docs/reference/engine/enums/TestCaseStatus.md).

### Property: TestRunResult.Skipped

```json
{
  "type": "int",
  "access": "ReadWrite",
  "security": {
    "read": "None",
    "write": "None"
  },
  "serialization": {
    "can_load": false,
    "can_save": true
  },
  "thread_safety": "ReadSafe",
  "category": "Data"
}
```

The number of tests whose status is [TestCaseStatus.Skipped](/docs/reference/engine/enums/TestCaseStatus.md).

### Property: TestRunResult.Status

```json
{
  "type": "TestRunStatus",
  "access": "ReadWrite",
  "security": {
    "read": "None",
    "write": "None"
  },
  "serialization": {
    "can_load": false,
    "can_save": true
  },
  "thread_safety": "ReadSafe",
  "category": "Data"
}
```

The outcome of the whole run:

- [TestRunStatus.Pass](/docs/reference/engine/enums/TestRunStatus.md) if at least one test passed and none failed or
  timed out.
- [TestRunStatus.Fail](/docs/reference/engine/enums/TestRunStatus.md) if any test failed or timed out.
- [TestRunStatus.Skipped](/docs/reference/engine/enums/TestRunStatus.md) if tests matched the filter but every one
  was skipped.
- [TestRunStatus.NoTests](/docs/reference/engine/enums/TestRunStatus.md) if no test was registered or matched the
  filter.

To decide whether a run passed, compare
[Status](/docs/reference/engine/classes/TestRunResult.md) with [TestRunStatus.Pass](/docs/reference/engine/enums/TestRunStatus.md).
Statuses may be added later, so don't treat everything other than
[TestRunStatus.Fail](/docs/reference/engine/enums/TestRunStatus.md) as a pass.

### Property: TestRunResult.Summary

```json
{
  "type": "string",
  "access": "ReadWrite",
  "security": {
    "read": "None",
    "write": "None"
  },
  "serialization": {
    "can_load": false,
    "can_save": true
  },
  "thread_safety": "ReadSafe",
  "category": "Data"
}
```

A one-line description of the run for people to read, such as
`3 passed, 1 failed, 0 skipped (4 total) in 812ms`. It's also printed to
the **Output** window when the run ends. Its wording may change, so read
the counts from [Passed](/docs/reference/engine/classes/TestRunResult.md),
[Failed](/docs/reference/engine/classes/TestRunResult.md),
[Skipped](/docs/reference/engine/classes/TestRunResult.md), and
[Total](/docs/reference/engine/classes/TestRunResult.md) rather than parsing it.

### Property: TestRunResult.Total

```json
{
  "type": "int",
  "access": "ReadWrite",
  "security": {
    "read": "None",
    "write": "None"
  },
  "serialization": {
    "can_load": false,
    "can_save": true
  },
  "thread_safety": "ReadSafe",
  "category": "Data"
}
```

The number of tests the run included: every test that was registered when
[TestService:RunTestsAsync()](/docs/reference/engine/classes/TestService.md) was called and matched its filter.

## Methods

### Method: TestRunResult:GetTests

**Signature:** `TestRunResult:GetTests(): Array`

Returns a [TestResult](/docs/reference/engine/classes/TestResult.md) for each test in the run, in the order the
tests ran.

*Security: None · Thread Safety: Unsafe*

**Returns:** `Array` — An array of [TestResult](/docs/reference/engine/classes/TestResult.md) objects, in the order the tests ran.

## Inherited Members

### From [Object](/docs/reference/engine/classes/Object.md)

- **Property `ClassName`** (`string`): A read-only string representing the class this Object belongs to.
- **Property `className`** (`string`):  *(deprecated)*
- **Method `GetPropertyChangedSignal(property: string): RBXScriptSignal`**: Get an event that fires when a given property of the object changes.
- **Method `IsA(className: string): boolean`**: Returns true if an object's class matches or inherits from a given class.
- **Method `isA(className: string): boolean`**:  *(deprecated)*
- **Event `Changed`**: Fires immediately after a property of the object changes, with some