Legacy | Assert

  • Command: status

  • Subcommand: assert

  • Supported Platforms: Native (legacy), Selenium

    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

Used to indicate the results of different test verification steps. At various points of interest within the test execution, you can add an Assert with a Message and Status indication that will appear in the test report and adds information regarding the completion of different test verification steps.

Parameters

Name Value Default Description
message*    

The description text to display as part of the test and in the Single Test Report (STR).

status* true (True) false (False)  

The status to report as part of the Assertion.

Setting the status to false will change the status of the execution to 'Completed with Errors'.

True - a success status will be displayed in the STR

False - a failure status will be displayed in the STR

* Mandatory parameter

Request & Response

Copy

Request

https://mycloud.perfectomobile.com/services/executions/johnt_controller_17-04-23_11_50_45_3?operation=command&securityToken=<your_token>&subcommand=assert&param.message="Deposited in account"
Copy

JSON response

 "reportPdfUrl": "http://localhost:8082/export/api/v1/test-executions/pdf?externalId[0]=johnt_controller_17-04-23_11_50_45_3",
 "executionId": "johnt_controller_17-04-23_11_50_45_3",
 "reason": "Success", 
 "testGridReportUrl": "http://localhost:3000?TENANTID=10000001&externalId[0]=johnt_controller_17-04-23_11_50_45_3",
 "singleTestReportUrl": "http://localhost:8080/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/170223/controller_17-04-23_11_50_45_3.xml&ownerId=johnt@perfectomobile.com&sharingCode=c6f3b25c-2c46-4060-a32c-167b397b0506",
 "description": "Success",
 "reportKey": "PRIVATE:controller/17022/controller_17-04-23_11_50_45_3.xml",
 "completed": "true",
 "flowEndCode": "SUCCEEDED"