Running mobile web tests
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
Ad-hoc test runs
You can do an ad-hoc test run from the Test Details page by clicking on the "Run test" button:
- Local run: the test will use the default device configurations. Not sure what these are? Check out Update test device setting.
- Cloud run: specify the desired mobile device configuration.
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.
Viewing test results
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 4 months ago