There are two ways to run a test using an emulated mobile device browser:
- Doing an ad-hoc test run in the mabl cloud by specifying a mobile device
- Using a plan configured for mobile web testing
You can do an ad-hoc test run from the test details page by clicking on the Run test button, selecting Cloud run, and specifying the desired mobile device configuration. At present, it is not possible to do such local runs in the mabl desktop app.
You can also automate validating the mobile web experience of your app on every deployment and on schedule. To do so, you need to create and configure a plan. Note that you can duplicate existing plans to save time. When configuring a plan, you can choose whether the tests should run across desktop browsers or across mobile devices emulated in the Chrome browser. You can select multiple mobile devices for the plan and mabl will trigger a separate test run for each selected device.
When the tests run, mabl will automatically assume the viewport of the respective emulated mobile device and any Set viewport steps within the test will be ignored for that run.
For example, if the default device setting for a test is set to a desktop browser with 1280 x 980 viewport, when you run the test on an emulated iPhone 12 device the test will run using a viewport of 390 x 844 and the Set viewport step will simply be ignored. Note that mabl will attempt to auto-scroll to target elements on the page so you don't need to worry about manually adjusting scrolling for each viewport size. See the mobile web test creation guide for tips on how to best account for navigation changes and lack of hover actions between desktop and mobile user experience.
When you run a test using an emulated mobile device configuration, the test results will appear in all familiar places where you will typically see mabl test results such as the Results page. You will see a mobile browser icon indicating that a given run was on a mobile device. You can also hover over that icon to see the exact device configuration.
When you click to view the results for a given test run, you will also be able to see the mobile device information within the header panel.
- Set viewport step may display different values than what is actually used for the test run.
- No element highlighting for target page elements within the screenshoots for a test run.
Updated about 2 months ago