# TestData

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.testing.contracts.storage.testdata/
> Summary: TestData: Sample data used by the tests.

<div class="api-provenance">Namespace Tracon.Testing.Contracts.Storage · Assembly <code>Tracon.Testing.Contracts.Xunit.dll</code></div>

Sample data used by the tests.

```csharp
public static class TestData
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.testing.contracts.storage.testdata/">TestData</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Methods

### <a id="Tracon_Testing_Contracts_Storage_TestData_Definition_System_String_"></a> Definition\(string\)

Produces a sample agent definition.

```csharp
public static AgentDefinition Definition(string name)
```

#### Parameters

`name` [string](https://learn.microsoft.com/dotnet/api/system.string)

The agent name.

#### Returns

 [AgentDefinition](/api/tracon.agentdefinition/)

The definition.

### <a id="Tracon_Testing_Contracts_Storage_TestData_EvalCase_System_Guid_System_String_"></a> EvalCase\(Guid, string\)

Produces a sample eval case.

```csharp
public static EvalCase EvalCase(Guid suiteId, string query = "question")
```

#### Parameters

`suiteId` [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

The ID of the suite it belongs to.

`query` [string](https://learn.microsoft.com/dotnet/api/system.string)

The query text.

#### Returns

 [EvalCase](/api/tracon.evalcase/)

The case.

### <a id="Tracon_Testing_Contracts_Storage_TestData_EvalCaseDraft_System_Nullable_System_Guid__System_String_"></a> EvalCaseDraft\(Guid?, string\)

Produces a sample eval case draft, as if promoted from a production run.

```csharp
public static EvalCaseDraft EvalCaseDraft(Guid? sourceRunId = null, string query = "question")
```

#### Parameters

`sourceRunId` [Guid](https://learn.microsoft.com/dotnet/api/system.guid)?

The ID of the promoted run.

`query` [string](https://learn.microsoft.com/dotnet/api/system.string)

The query text.

#### Returns

 [EvalCaseDraft](/api/tracon.evalcasedraft/)

The draft.

### <a id="Tracon_Testing_Contracts_Storage_TestData_EvalRun_System_String_System_Guid_"></a> EvalRun\(string, Guid\)

Produces a sample eval run.

```csharp
public static EvalRun EvalRun(string tenantId, Guid suiteId)
```

#### Parameters

`tenantId` [string](https://learn.microsoft.com/dotnet/api/system.string)

The tenant ID.

`suiteId` [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

The ID of the suite being measured.

#### Returns

 [EvalRun](/api/tracon.evalrun/)

The run.

### <a id="Tracon_Testing_Contracts_Storage_TestData_EvalSuite_System_String_System_String_"></a> EvalSuite\(string, string\)

Produces a sample eval suite.

```csharp
public static EvalSuite EvalSuite(string tenantId = "default", string name = "customer-support-team")
```

#### Parameters

`tenantId` [string](https://learn.microsoft.com/dotnet/api/system.string)

The tenant ID.

`name` [string](https://learn.microsoft.com/dotnet/api/system.string)

The suite name.

#### Returns

 [EvalSuite](/api/tracon.evalsuite/)

The suite.

### <a id="Tracon_Testing_Contracts_Storage_TestData_Event_System_Guid_System_Int64_"></a> Event\(Guid, long\)

Produces a sample run event.

```csharp
public static RunEvent Event(Guid runId, long sequence)
```

#### Parameters

`runId` [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

The run ID.

`sequence` [long](https://learn.microsoft.com/dotnet/api/system.int64)

The sequence number.

#### Returns

 [RunEvent](/api/tracon.runevent/)

The event.

### <a id="Tracon_Testing_Contracts_Storage_TestData_Job_System_String_System_Nullable_System_DateTimeOffset__"></a> Job\(string, DateTimeOffset?\)

Produces a sample queued job. Ready to pass to `EnqueueAsync`.

```csharp
public static JobRecord Job(string tenantId = "default", DateTimeOffset? scheduledFor = null)
```

#### Parameters

`tenantId` [string](https://learn.microsoft.com/dotnet/api/system.string)

The tenant ID.

`scheduledFor` [DateTimeOffset](https://learn.microsoft.com/dotnet/api/system.datetimeoffset)?

The time the job is due to run. Defaults to now.

#### Returns

 [JobRecord](/api/tracon.jobrecord/)

The job record.

### <a id="Tracon_Testing_Contracts_Storage_TestData_Run_System_Guid_System_String_"></a> Run\(Guid, string\)

Produces a sample run start.

```csharp
public static RunStartInfo Run(Guid runId, string agentName = "test-agent")
```

#### Parameters

`runId` [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

The run ID.

`agentName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The agent name.

#### Returns

 [RunStartInfo](/api/tracon.runstartinfo/)

The start info.

### <a id="Tracon_Testing_Contracts_Storage_TestData_Schedule_System_String_System_String_"></a> Schedule\(string, string\)

Produces a sample schedule.

```csharp
public static JobSchedule Schedule(string tenantId = "default", string name = "night-report")
```

#### Parameters

`tenantId` [string](https://learn.microsoft.com/dotnet/api/system.string)

The tenant ID.

`name` [string](https://learn.microsoft.com/dotnet/api/system.string)

The schedule name.

#### Returns

 [JobSchedule](/api/tracon.jobschedule/)

The schedule.

### <a id="Tracon_Testing_Contracts_Storage_TestData_Session_System_String_System_Nullable_System_Text_Json_JsonElement__"></a> Session\(string, JsonElement?\)

Produces a sample session record.

```csharp
public static SessionRecord Session(string sessionId, JsonElement? state = null)
```

#### Parameters

`sessionId` [string](https://learn.microsoft.com/dotnet/api/system.string)

The session ID.

`state` [JsonElement](https://learn.microsoft.com/dotnet/api/system.text.json.jsonelement)?

The serialized state. A sample object is used when omitted.

#### Returns

 [SessionRecord](/api/tracon.sessionrecord/)

The session record.

### <a id="Tracon_Testing_Contracts_Storage_TestData_State_System_String_"></a> State\(string\)

Converts raw JSON text to a [JsonElement](https://learn.microsoft.com/dotnet/api/system.text.json.jsonelement).

```csharp
public static JsonElement State(string json)
```

#### Parameters

`json` [string](https://learn.microsoft.com/dotnet/api/system.string)

The JSON text.

#### Returns

 [JsonElement](https://learn.microsoft.com/dotnet/api/system.text.json.jsonelement)

A standalone JSON element.
