ListTestsCommand

Gets information about tests in a given test suite.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { DeviceFarmClient, ListTestsCommand } from "@aws-sdk/client-device-farm"; // ES Modules import
// const { DeviceFarmClient, ListTestsCommand } = require("@aws-sdk/client-device-farm"); // CommonJS import
const client = new DeviceFarmClient(config);
const input = { // ListTestsRequest
  arn: "STRING_VALUE", // required
  nextToken: "STRING_VALUE",
};
const command = new ListTestsCommand(input);
const response = await client.send(command);
// { // ListTestsResult
//   tests: [ // Tests
//     { // 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"),
//       },
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

Example Usage

 Loading code editorLoading code editor

ListTestsCommand Input

See ListTestsCommandInput for more details

Parameter
Type
Description
arn
Required
string | undefined

The test suite's Amazon Resource Name (ARN).

nextToken
string | undefined

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

ListTestsCommand Output

See ListTestsCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
nextToken
string | undefined

If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

tests
Test[] | undefined

Information about the tests.

Throws

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.