Skip to content
Newsletter

How Can Flutter Teams Ensure TestSweets Adapt to Various Screen Sizes for Seamless Automation?

Using TestSweets to run automated tests on all screen sizes

Posted on:February 2, 2024
3 minutes
open-graph-image

TestSweets automation is done in 2 steps.

  1. You add automation points to your app through the in-app UI
  2. You write the scripts that interact with those points

When you capture automation points through the in-app UI, it’s captured for a single screen size.

And when you then run your app on a different device we automatically scale that automation point to be “at the same place” on the new screen.

Responsive Sizing for Test Automation

We do this using a basic ratio calculation.

If you captured your point on a device that is 100x100, then run it on a device that is 150x150, we will adjust the position of the automation point by 1.5, which is, target screen size / captured screen size. In this case 150 / 100 = 1.5.

This is not always accurate, so we implemented a new feature in the product.

Screen buckets for automation points

Screen size-aware automation points

TestSweets now has the ability to adjust an automation point on a different screen size and it will always show up at that position for that screen size.

The way this is done in the interface is quite simple.

  1. Run your app on a device you haven’t captured any automation points on
  2. Look for any automation points that are out of place
  3. Long-tap that automation point and move into position

TestSweets will save the new device size along with the position for that device and that information will be used when placing the automation point.

This also means that when you run on a device with a screen size close to the one you captured on, it will use the new screen data to responsively size using the updated screen size.

Why is this important

This makes the responsive UI handling for TestSweets very accurate to the point where the same test cases can run for different layouts simply because you can adjust the automation points for those layouts.

This means that not only is it more accurate for mobile devices, but also for different form factors.

You can run your app on tablets and adjust the automation points accordingly.

With this new feature it means your automation points on other devices will not be affected, and you can run the same test cases across all these devices.

Good luck with your test automation.


Let’s work together

If you’re a company working with Flutter, with revenue higher than $3m per year, we have an enterprise offer for you.

We will write and maintain all your automated tests for you and your team.

Reach to automation@filledstacks.com if you want to work with a team focused on team performance through automation.

If you want to start automating your quality process yourself, here’s a 7-day free trial to try out TestSweets.


If you want to get these in your inbox, for our newsletter.

Also check out