- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetTestCommand
Gets information about a test.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DeviceFarmClient, GetTestCommand } from "@aws-sdk/client-device-farm"; // ES Modules import
// const { DeviceFarmClient, GetTestCommand } = require("@aws-sdk/client-device-farm"); // CommonJS import
const client = new DeviceFarmClient(config);
const input = { // GetTestRequest
arn: "STRING_VALUE", // required
};
const command = new GetTestCommand(input);
const response = await client.send(command);
// { // GetTestResult
// test: { // Test
// arn: "STRING_VALUE",
// name: "STRING_VALUE",
// type: "BUILTIN_FUZZ" || "APPIUM_JAVA_JUNIT" || "APPIUM_JAVA_TESTNG" || "APPIUM_PYTHON" || "APPIUM_NODE" || "APPIUM_RUBY" || "APPIUM_WEB_JAVA_JUNIT" || "APPIUM_WEB_JAVA_TESTNG" || "APPIUM_WEB_PYTHON" || "APPIUM_WEB_NODE" || "APPIUM_WEB_RUBY" || "INSTRUMENTATION" || "XCTEST" || "XCTEST_UI",
// created: new Date("TIMESTAMP"),
// status: "PENDING" || "PENDING_CONCURRENCY" || "PENDING_DEVICE" || "PROCESSING" || "SCHEDULING" || "PREPARING" || "RUNNING" || "COMPLETED" || "STOPPING",
// result: "PENDING" || "PASSED" || "WARNED" || "FAILED" || "SKIPPED" || "ERRORED" || "STOPPED",
// started: new Date("TIMESTAMP"),
// stopped: new Date("TIMESTAMP"),
// counters: { // Counters
// total: Number("int"),
// passed: Number("int"),
// failed: Number("int"),
// warned: Number("int"),
// errored: Number("int"),
// stopped: Number("int"),
// skipped: Number("int"),
// },
// message: "STRING_VALUE",
// deviceMinutes: { // DeviceMinutes
// total: Number("double"),
// metered: Number("double"),
// unmetered: Number("double"),
// },
// },
// };
Example Usage
Loading code editorLoading code editor
GetTestCommand Input
See GetTestCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
arn Required | string | undefined | The test's ARN. |
GetTestCommand Output
See GetTestCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
test | Test | undefined | A test condition that is evaluated. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ArgumentException | client | An invalid argument was specified. |
LimitExceededException | client | A limit was exceeded. |
NotFoundException | client | The specified entity was not found. |
ServiceAccountException | client | There was a problem with the service account. |
DeviceFarmServiceException | Base exception class for all service exceptions from DeviceFarm service. |