Step 1: Setting in Portal
-
Go to Portal page → User → Settings → Network Capturing tab
-
Here, enter the domain name(s) that you wish to capture separated by whitespace or comma.
-
Moreover, click on the Advanced settings. Here, you can choose data types that you want to capture in your requests/responses by turning them on using toggle buttons.
-
Click Apply.
Step 2: Obtain device's UDID
-
You can get the UDID value in the IMEI/IMSI/MEID field in the phone status setting (Go to device's Settings > About Phone > Status)
-
Alternatively, you can plug the device into a computer and obtain it through Terminal
Step 3: Install Kobiton Certificate:
First, download Kobiton certificate for Network Payload Capture (NPC):
For setting up NPC for devices on Latest Kobiton platform, a certificate file from Kobiton is required. Contact the Kobiton support team for the download link.
For setting up NPC for devices on Legacy Kobiton platform, a certificate file from Kobiton is required. Contact the Kobiton support team for the download link.
-
Method 1: Install the Android File Transfer app onto a macOS system that an Android device is plugged directly into. (This app is currently not available in the macOS App Store. Obtain it by download from Android File Transfer site.) Pull the certificate file to the macOS file system; then use the Android File Transfer app to copy it onto the device (where it will usually show up in a standard “Downloads” folder).
-
Method 2: Make sure that your device is connected to your machine
Step 1: Download the certificate on your laptop
Step 2: Run this command in terminal:
1adb push 'path-to-your-downloaded-certificate' 'sdcard’
'path-to-your-downloaded-certificate' is the path of this certificate that was downloaded to your laptop and ‘sdcard’ is the folder of the device that this certificate will be copied to.
For example: adb push '/Users/$(whoami)/Downloads/mitmproxy-cert.crt' 'sdcard'
Step 4: Setup Kobiton Certificate in device
For Android 10 or below
-
Go Settings → Storage → Explore and Kobiton Certificate is shown here. Click on this Certificate file. Next, we need to set up a passcode (pin/password) for the device.
-
If the device has already set up a passcode:
A pop-up message will ask you to input the device passcode. After bypassing the passcode, enter the certificate name and tap the OK button. The certificate will be installed. - If the device hasn't got a passcode:
- Input the Certificate Name then select OK.
- A pop-up message will ask you to set a lock screen PIN or password before you move further. Select OK.
-
- Choose any option you want to use to set up a lock screen including Pattern, PIN, Password,... After finishing setting up the passcode, the certificate will be installed.
For Android 11 or later
Go to Settings → Biometrics and security → Other security settings -> Install from the device storage → CA certificate → a warning message appears, click on “Install anyway” button → Select certificate in Internal storage. After doing these steps, this certificate is installed.
Step 5: Remove your created passcode before moving further
Go to Settings → Security → Screen lock → Input your PIN → choose screen lock: None → a pop-up will appear, choose “Yes, remove” to delete all passcode.
Step 6: Download Apple Configuration 2 in AppStore
-
Do not plug the device.
-
Go to the AppStore or follow the link here to download the Apple Configurator 2 application.
-
Open Apple Configurator 2.
-
In Apple Configurator 2 on the top of your screen, Click on choose Install Automation Tools in the Apple Configurator 2 menu, click on Install, then enter your administrator password.
Step 7: Add the config file
-
Make sure the device is not plugged into the computer and do not start Kobiton Desktop App yet.
-
Go to the path below (In other to get the device UDID, please see step 2).
/Users/$(whoami)/Library/Application Support/Kobiton/devices/your-device-udid |
-
Create a file named config in this folder with the content below:
{"unlockPasscodeEnabled": false,
"networkPayloadCaptureEnabled": true}
Step 8: Do the Network Payload capture testing on the device
-
Make sure that the mobile device and the computer where it is plugged connect to the same Wifi/Ethernet address.
-
With the mobile device plugged in, launch the Kobiton Desktop application.
-
Make sure that the Apple configurator tool is started and running during the test for Android devices.
-
Start your test session including Manual (or Appium automation) that accesses the domain which is set up to capture payload.
-
You can view the payload in the tab Observe Request / Response Payloads in Session Detail page on the Kobiton portal.