Reference Overview
This page is a short orientation. Use the linked reference pages when generating integration code or validating an SDK response.
Main Models
Model | Important fields |
|---|---|
Device | serial, marketName, platform, platformVersion, state, isSimulator, isPublic |
DeviceApp | bundleIdentifier, installedAt, updatedAt, isDefault |
Pool | id, name, isDefault |
Allocation | allocationId, deviceSerial, position, expiresAt |
Session | sessionId, allocationId, state, videoRecordingScope, device and recording fields |
ScreenRecord | fileKey, downloadUrl, duration |
Application | fileKey, version, revision, downloadUrl |
Response fields can be null while Device Park is preparing or assigning a resource. Check identifiers before using them in the next SDK method.
Examples:
- Allocation.deviceSerial can be null while waiting in the queue.
- Session.endDate can be null while the session is active.
- Session.videoRecordUrl can be null until recording processing finishes.
- Signed download URLs can expire and should not be stored as permanent identifiers.
Node.js Errors
Error | Meaning |
|---|---|
DeviceParkConfigError | Invalid SDK configuration or method argument |
DeviceParkHttpError | Device Park returned a non-success response |
DeviceParkSerializationError | Response JSON could not be parsed |
try {
await client.devices().list();
} catch (error) {
if (error instanceof DeviceParkHttpError) {
console.error(error.status, error.body);
} else {
throw error;
}
}Java validates required configuration and arguments with IllegalArgumentException. Never log credentials, tokens or authorization headers when reporting failures.
.NET Errors
Error | Meaning |
|---|---|
DeviceParkConfigException | Invalid SDK configuration or method argument |
DeviceParkHttpException | Device Park returned a non-success response |
DeviceParkSerializationException | Response JSON could not be parsed |
All types live in Testinium.DevicePark.Errors and derive from DeviceParkException.
try
{
await client.Devices.ListAsync();
}
catch (DeviceParkHttpException error)
{
Console.Error.WriteLine($"{error.Status} {error.ErrorCode} {error.ErrorMessage}");
}DeviceParkHttpException also parses the backend error envelope into ErrorCode and ErrorMessage; both are null when the response does not use it. Body always carries the raw response. A request timeout surfaces as TaskCanceledException.
For exact fields, nullability and JSON shapes, see Model Contracts. For catch patterns and timeout behavior, see Error Handling.
Handle Failures
- Configuration errors indicate missing or invalid client configuration.
- HTTP errors contain the response status and body returned by Device Park.
- Network failures and request timeouts can occur before a response exists; handle them separately from HTTP errors.
- Preserve the original test failure when cleanup also fails.
Cleanup Failures
Attempt cleanup in this order:
- Stop active sessions.
- Release allocations that will not be reused.
- Close the SDK client.
Log cleanup errors with their resource identifiers, but do not replace the original test error with a later cleanup error.