Timer report (FR)

Perfecto Command

mobile:status:timer

Purpose

Adds a timer report to the test. The measured timer result is reported from the test (retrieved via the Get timer command) into the generated Single Test Report. The report is named according to the name parameter and based on the timing measurement specified by the result parameter.

For more details on adding timer reports to your test, see Performance testing.

Parameters

Name Type Possible Values Description
name String

Mandatory.

The timer report name to display as part of the test and in the Single Test Report.

result Integer

Mandatory.

The calculated timer result duration in milliseconds.

Minimum value is 0.

status String success | failure  The defined timer report status.
If the status is not set, it will be calculated using the timer result and threshold parameter values. If the result is greater than the threshold then the status will be a failure. Defining a status will override the calculated status result even if the status was calculated as failure.
Setting the status to failure will change the status of the execution to 'Completed with Errors'.
Success - a success status will be displayed in the Single Test Report
Failure - a failure status will be displayed in the Single Test Report
description String The description text to display as part of the test and in the Single Test Report.
threshold String

The maximum threshold duration allowed for this timer in milliseconds.

If a threshold is defined, the success/fail state of the command will be based on whether the reported timer value exceeds the threshold or not.

Minimum value is 0.

Return Value

None

Exceptions

None

Examples

Copy

Java sample

Map<String, Object> params = new HashMap<>();
params.put("name", "myTimeReport");
params.put("result", elapsTime);
driver.executeScript("mobile:status:timer", params)
Copy

C# sample

Dictionary<String, Object> pars = new Dictionary<String, Object>();
pars.Add("name", "scriptTimers");
pars.Add("result", timeSys);
driver.ExecuteScript("mobile:status:timer", pars);