Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Jun 13, 2017 13:06

Perfecto Command

mobile:status:timer

Purpose

Adds a timer report to the test. The measured timer result is reported from the test into the generated Single Test Report.

For more details on adding timer reports to your test, see this article.

 

Parameters

NameTypePossible ValuesDescription
nameString 

Mandatory.

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

resultInteger 

Mandatory.

The calculated timer result duration in milliseconds.

Minimum value is 0.

statusStringsuccess | 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
descriptionString The description text to display as part of the test and in the Single Test Report.
thresholdString 

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

Java sample
Map<String, Object> params = new HashMap<>();
params.put("name", "myTimeReport");
params.put("result", elapsTime);
driver.executeScript("mobile:status:timer", params); 
C# sample
Dictionary<String, Object> pars = new Dictionary<String, Object>();
pars.Add("name", "scriptTimers");
pars.Add("result", timeSys);
driver.ExecuteScript("mobile:status:timer", pars);