Legacy | Audio checkpoint
-
Command: checkpoint
-
Subcommand: audio
-
Supported Platforms: Native (legacy), Selenium, Appium
All commands must be executed using the same framework. Sharing the execution ID between different frameworks is not possible. This means that if you work with a Selenium/Appium driver, you need to call the commands using the Selenium/Appium driver (or, in the case of Reporting commands, through the Reporting SDK that works with the driver) and not as part of a UFT test or another framework.
-
Supported OS: Android, iOS
Description
Ensures the device is playing sounds. The audio checkpoint validates that an audio clip is playing on the device. It is also possible to set the minimal duration of the audio clip to be validated.
When working with this checkpoint:
- Verify that the device has its volume set to maximum.
- Set the
duration
parameter of the audio checkpoint to be a reasonable length of time to detect the audio, but shorter than thetimeout
parameter.
Parameters
Name | Value | Default | Description |
---|---|---|---|
deviceID* | The device for this command. | ||
volume | -70 | The minimal volume threshold, in decibels. | |
timeout | 10 | The time, in seconds, to wait for the audio to play. | |
duration | 1 | The length, in seconds, of the validation, to ensure the device plays audio during a set period of time. Setting this parameter will cause the system to continually check the audio output for the defined duration. |
* Mandatory
Request & Response
Request
https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-11-10_12_25_57_25?operation=command&securityToken=<your_token>&command=checkpoint&subcommand=audio¶m.deviceId=HT5BAJT00574¶m.duration=1¶m.volume=-100¶m.timeout=15
JSON response
{
"reason":"Success",
"timer.elapsed":"2766",
"returnValue":"true",
"testGridReportUrl":"https://mycloud.reporting-01.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-11-10_12_25_57_25",
"description":"Success",
"timer.system":"2766",
"completed":"true",
"flowEndCode":"SUCCEEDED",
"executionId":"john@perfectomobile.com_controller_16-11-10_12_25_57_25",
"timer.ux":"0",
"singleTestReportUrl":"https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161110/controller_16-11-10_12_25_57_25.xml&ownerId=john@perfectomobile.com&sharingCode=3fed09e4-821a-4f94-a88e-43eaa9fde74d",
"reportKey":"PRIVATE:controller/161110/controller_16-11-10_12_25_57_25.xml",
"timer.device":"0"}