PWA for the Win!

PWA for the Win!

Over the past 2 weeks I worked on overkilling my site by converting it to a PWA.

You are probably asking a few questions:

  1. What is a PWA?
  2. How do I do it?
  3. Whats the benefit for testing?

Read on for all of the awesomeness.

What is a PWA

Suprised it is an acronym. It stands for progressive web app. I know my site is not an app but I learned about it and thought it would be cool to implement it. Yes it is overkill.

Remember: There is no such thing as underkill

So what does this mean?

A few things occur when you visit my site now and these are mainly seen only on mobile devices the cool stuff that happens on any device will have a global at the end

Mobile Awesomeness

  1. If switching tabs in supported browsers the tab will be purple and the icon of my site will be white
  2. If you visit the site frequently enough supported browsers will ask if you want to install my site as an app.

Global Awesomeness

  1. On the first visit it there is a service worker that will download some other posts for offline viewing

Yup Offline Viewing

Why not. Better yet though if you had an actual app you can have all of the views saved so that the rendering of the page navigation will be instantaneous. The only wait will be for getting data back from the database.

Instantaneous Page Navigation, < 300ms

Why 300ms? Anything faster than that cannot be registered by human eyes.

Benefits For Testing?

Yessir. Speeeeed!!!


Decoupled UI Testing


Since it is possible to feed in a JSON file as the results from the database, if you were to set up mock JSON files as what the database is returning your tests can be fast since they are not waiting on network requests or database calls.

The database requests can be validated with API testing. Which are quick since they are just GET and POST requests.

Want an Absolute Fantastic Setup for this?

Upvote here so that I can gauge the interest in doing this, besides my general geekiness.

Trello Board of Upcoming Projects

Andrew Krug's Picture

About Andrew Krug

Automation consultant helping you deliver greatness effectively.

New York, USA