Posted in tools

Chrome DevTools – mobile testing

talking-tools1

Moving on – Chrome DevTools could be used in web and mobile testing. Any tester should take advantage of it, because those tools are free and easily accessible. Let me introduce the most useful ideas for testing purposes, maybe you’ll come up with some new ones?

I hope that my super-fantastic screenshots enable you to find all the options and play around.

#1 Resizing and Rotating

As I said some time on my presentation, it is very important to check UI of your website on mobile browsers. Different ones. When we proceed manual tests (or don’t test our websites at all) it may happen that they are useless on mobile devices. And I am not talking about web applications, but also about any website accessible via web browser on your smartphone.

I am able to enumerate number of such examples – the most spicy you could find on my Twitter. If you find your ugly page here or on my Twitter – it’s nothing personal. i just want the web-world to be a better place 🙂

So… to avoid this:

screenshot_2016-05-01-15-48-42

this..

screenshot_2016-08-10-17-50-22

or that…

screenshot_2016-10-22-17-45-45

Use the “Responsive” option in Chrome DevTools in order to make sure that majority of different screen resolutions is covered.

Remember – over 50% of google searches come from mobile browsers nowadays!

responsive

We can select a number of different mobile devices from the drop down menu in order to test with the different screen sizes. Chrome also tells us the screen dimensions of the device in the top menu as well, what is more, you are also able to rotate the screen. Screen rotation is also a common cause of mobile bugs, as the mobile website layout changes when the screen is rotated and page elements may need to reload.

It won’t pretend the real device, but give you lot of hints what other tests should be performed on your application.

#2 Console – debug

Either a developer or a tester is able to debug a website on mobile device (I wrote here how to connect your smartphone with Chrome DevTools).

In your JavaScript Console – you are able to find all range of errors appearing within the application.

As the complexity of JavaScript applications increase, developers need powerful debugging tools to help quickly discover the cause of an issue and fix it efficiently. The Chrome DevTools include a number of useful tools to help make debugging JavaScript less painful.

debug

#3 Network and Throttling

The Network option allows you to observe the order and time of loading elements. You are provided with insights into resources that are requested and downloaded over the network in real time. It very important in mobile testing as users expect that mobile apps would work smooth and fast.

  1. Open DevTools (F12)
  2. Click the ‘Network’ tab
  3. Click Throttling in s row below
  4. Select which type of connection you want to imitate
  5. Reload the page to see assets downloading at that connection speed

network

The Network tab in Chrome DevTools has an option to faux throttle your network, so you can experience what your users might see visiting your website on 3G, 2G and EDGE connections. Throttling option is also useful for visualizing how fonts load.

throttling.png

What kind of errors are likely to avoid with such testing? Let me show you a few examples:

screenshot_2016-08-10-16-50-47

screenshot_2016-08-12-23-11-04

#4 Audit

The Audit panel can analyze a page as it loads. Then provides suggestions and optimizations for decreasing page load time and increase perceived (and real) responsiveness.

#5 Elements

The Elements panel allows you to see everything in one DOM tree, and helps inspection and on-the-fly editing of DOM elements. It is very useful option for those, who automate their testing.

But you’ve been probably heard about this one:)

#6 Location

And this is a great functionality! How to test the app that must work in different locations and presents a map for you – teleport wasn’t invented yet! There is an option in DevTools that allows you to mimic location. The option is a bit hidden:

  1. Open Dev Tools
  2. Click action bar on the bottom right of the screen
  3. Select More Tools
  4. Click Sensors

location

loc

Now you are able to provide a website/application with your desired geo-coordinates and pretend you are there. Remember about reloading the page with every coordinate change.

There is more – all you need is to explore the options.

Have fun with DevTools. In case of any questions – stalk me on Twitter.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s