In addition to using a Manual session, you can use an automation session as the baseline session for rerunning a test script with Kobiton's Scriptless functionality.
Prerequisite
First, run an Automation session on Kobiton with an Appium automation script. To illustrate, we will use this example script. NOTE: Before running the script, make sure you:
Step 1. Enter your username and API key (API key can be retrieved in https://portal.kobiton.com/settings/keys) to the file Configs.java in the example script.
(You can find the file in the sample script's folder path: samples/java/java_testng_junit/src/main/java/kobiton/com/configs/Configs.java)
Step 2. Add the desired capability scriptlessEnable to the Configs.java file
One the above is done, you can run the script through Kobiton. After you run the script and have the resulting Automation session on the Kobiton platform, you should be able to retrieve the session name and session ID on the Session List.
There are two methods to trigger Scriptless reruns from that automation session - via the Kobiton portal or via a REST API call.
Method 1: Trigger scriptless rerun via the Kobiton portal
After navigating to the session on Session List, right-click on the session and select View Test Execution Plan.
In the Test Execution Plan view, select the Run button in the upper right corner to trigger a Scriptless rerun.
Method 2: Trigger Scriptless rerun via REST APIs call
Use the endpoint is below. You can also refer to our API documentation for more information.
POST |
|
We will use Postman to illustrate. If you are not familiar with setting up Postman and Kobiton, refer to our example for uploading apps to Kobiton devices with Postman here to see the basic setup steps.
Authentication
Input your username and API Key (which can be found at https://portal.kobiton.com/settings/keys) to connect to the Kobiton portal:
Body
First, you need to choose raw data with JSON format.
Enter the ID of the baseline automation session to exploringSessionIds parameter. Enter the device bundle intended for testing to deviceBundleId parameter (device bundle ID can be retrieved at https://portal.kobiton.com/organization/device-bundles).
Another example of triggering Scriptless with some (but not all) devices in a device bundle:
Note: If there are two devices specified in one deviceCapabilities parameter, it would be an OR condition which means the system can pick either Galaxy Note10 or Galaxy Note20 Ultra 5G if the other device is not available.
There are more parameters that you can apply when triggering Scriptless rerun sessions - see our API documentation for more information.
Trigger the API call
Select Send in Postman to trigger Kobiton Scriptless reruns. The response would look like this:
Supported endpoints (for both Android and iOS)
-
All GET endpoints
-
POST /wd/hub/session[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/element[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/elements[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/context[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/timeouts[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/appium/settings[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/execute[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/execute/sync[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/actions[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/touch/perform[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/touch/longclick[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/element/(${PARAM_PATTERN})/click[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/element/(${PARAM_PATTERN})/value[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/element/(${PARAM_PATTERN})/clear[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/appium/device/press_keycode[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/back[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/orientation[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/keys[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/appium/device/hide_keyboard[?]*$
-
POST /wd/hub/session/(${PARAM_PATTERN})/location[?]*$