On this page, we shall explain how to run batch tests in MagicPod and how to run tests from the command line.
Table of Contents
- Run batch tests using the MagicPod screen
- Run batch tests for multiple types of devices (for external cloud services)
- Run batch tests using the command line (for cloud or external cloud services)
1. Run batch tests using the MagicPod screen
On MagicPod, it is possible to run all of the tests in the project as a batch. To run them as a batch, select the “Batch runs” tab from the project screen, to move to the batch test execution page. (Figure 1)
Figure 1 Batch test execution page
On this screen, specify the target OS and app to be tested (Figure 2), and click the “Run new batch” button.
Figure 2 Specifying the target OS and app to be tested
MagicPodDesktop will launch and run the test on the Cloud if you are in the Cloud environment, or in a local PC environment. Once the page is loaded on the browser, confirm that the test(s) currently being run are added to the batch run list (Figure 3).
Figure 3 Image of tests being run on batch run
Once the test is completed, the “Success/Failure” status and execution time can be viewed in the browser (Figure 4).
If you click the Batch run number to the left of the list or the “>” link to the right of the list, you can further confirm the results by test.
Figure 4 Batch execution test results
If you click each test case number, you can confirm the detailed test execution log. (Figure 5).
Figure 5 Execution results by test
If the test fails, you can confirm the error content and screen capture at the time of the error (Figure 6).
Figure 6 Error test details
Once the test completes, an email of the test results is sent to all of the project members. (Figure 7)
Figure 7 Test results email
Scheduled execution is also possible.
2. Run batch tests for multiple types of devices (for external cloud services)
When using an external Cloud service, by clicking the Add button for “+” in Figure 8, you can create settings for the batch execution of tests for multiple combinations of versions and models.
Figure 8 Adding Device Patterns
- In the case of Remote TestKit, a 10-minute wait process may occur at the start of the test for the return process of the device used.
- By default, testing of the next device will not start until the testing of another type of device ends. If the plan you are contracted for allows for the execution of tests in parallel with multiple types of devices on BrowserStack or Remote TestKit, by specifying the number of simultaneous parallel instances on the MagicPod side, as shown in Figure 9, it is possible to run tests on multiple types of devices in parallel.
Figure 9 Specifying the number of simultaneous parallel instances
3. Run batch tests using the command line (for cloud or external cloud services)
In the case of tests using MagicPod Cloud devices or external Cloud services, it is possible to run these simply as a batch via the Web API.
1. curl,Invoke-RestMethod
In terms of the procedure, after setting the test target on the batch test execution screen, as shown in Figure 10, you can acquire the commands that can be run with this setting in the form of curl (for Mac/Linux) or Invoke-RestMethod (for Windows PowerShell).
Figure 10 Copying the batch test execution commands
2. magicpod-api-client
In the case of the curl and Invoke-RestMethod format, you cannot check the test results without waiting until the batch test execution is complete (it is necessary to check the test results on the MagicPod screen or in the test results email). You can resolve this problem by using the magicpod-api-client.
In terms of the procedure, download and unzip magicpod-api-client via API using the following command, and place it in a suitable location.
curl -L "https://app.magicpod.com/api/v1.0/magicpod-clients/api/{os}/latest/" -H "Authorization: Token {apikey}" --output {filename}.zip
- {os}: Mac is mac、Windows is windows、Linux is linux
- {apikey}: API token
- {filename}: Arbitrary file name
To use the magicpod-api-client, download either linux64_magicpod-api-client.zip, mac64_magicpod-api-client.zip, or win64_magicpod-api-client.exe.zip, depending on the OS used, from here, unzip the same, and save it to an appropriate location.
Following this, use the “Copy magicpod-api-client format” function, to simply acquire the command for calling magicpod-api-client as in Figure 10.
Figure 11 State during test execution
Figure 12 The result of the test success is displayed
The detailed Web API specifications can be confirmed from “API token” > “API documents” in the User menu. (Figure 13)
Figure 13 Web API Documents