Operations of the LINE app are not officially supported by MagicPod, and we cannot guarantee proper functionality, such as whether UI elements within the app can be accurately captured. Additionally, there are constraints such as the inability to modify code when errors occur, so please carefully consider these limitations before use.
Preparation for using the LINE app in a test
Testing with the LINE app is possible under the following conditions:
- Use a real mobile device
- The LINE app must be pre-installed on the device
- Phone number authentication for the LINE app must be completed
How to open the LINE app within a test case
You can open the LINE app and operate it in your test by using the "Launch Specified iOS App" command or "Launch Specified Android App" command.
Reference: Launch an app such as a browser using mobile app test scripts
Confirm LINE message delivery in a test case
Here's an implementation example for cases where you send a LINE message from another app or service and then verify its receipt in the LINE app.
When distributing LINE messages in a browser test
By using magicpod-api-client, you can execute tests consecutively as follows.
Execute this .sh file in the directory containing magicpod-api-client:
#!/bin/bash
SECRET_API_TOKEN="<API token>"
# Step 1: Run the browser test to distribute LINE message
if ./magicpod-api-client batch-run -t "$SECRET_API_TOKEN" -o <organization_name> -p <project_name_browser> -S <setting_number>; then
# Step 2: If Step 1 succeeds, run the mobile app test to verify message delivery in LINE app
./magicpod-api-client batch-run -t "$SECRET_API_TOKEN" -o <organization_name> -p <project_name_mobile_app> -S <setting_number>
fi
※This integration requires subscriptions to both the "Browser Testing Plan" and "Mobile App Testing Plan.
You can also schedule regular executions by integrating with a CI tool or using local scheduling tools such as cron or Task Scheduler.
Reference: How to run mobile app tests and browser tests sequentially
When distributing LINE messages in a mobile app test
If the app/service that distributes LINE messages is available through the Safari/Chrome browser on mobile devices, you can test the entire following flow within a mobile app test:
- Send a LINE message by operating in the Safari/Chrome browser
- Switch to the LINE app to verify message receipt
In this case, to make troubleshooting easy when tests fail, we recommend creating separate test cases for:
- Up to LINE message transmission
- LINE message receipt confirmation
and running them consecutively using batch execution.