TA: How to test a simple WebApp

When building a solution for mobile users there are a bunch of solutions to choose from. Responsive Website, Progressive Web App, Android/iOS WebApp or Android/iOS App. All come with advantages and disadvantages. If you have a website that is responsive it's very easy to turn this into a (webview) WebApp. But do you need to test this? And if so, how do you test this?

Android WebApp

Let's look at a simple Android WebApp example.

We now just turned a simple website into a Android WebApp. You will notice you can navigate through the website and when you use the phone back button, it will first navigate back on the website itself unless your at the initial loaded page, in which case it will close the WebApp. It looks just like the regular website, but can we test it the same way? And/Or can we test the responsive website and assume the webapp works just as fine as the webview app?

To test or not to test?

If you have a simple website, only testing the responsive website itself could be enough in theory. But every tester should tell you they cannot guarantee you the app work even when the website has been tested properly. And the reason is simple. It's a different product with different functionality (webview versus browser), so basically another configuration that needs to be tested to be confident enough to say it's good enough to put in production.

Browser versus native browser versus webview

Let's look at this from another angle to show the complexity of being confident your website works on enough configurations to push it to production. Android has a range of OS versions (see also my latest post on the Android statistics), and many manufacturers like tweak this OS before they put this on their phones (also see this stackoverflow Q&A). Besides that websites are usually build to work on the latest version of Chrome. So you can install the latest Chrome browser on the Phone, but webview is not the same. So where the website might work on the Chrome browser using an older OS version. It might not work on the native installed browser or on the webview.

Further more the webview is lacking functionality that the regular browser has. One such an example is that you cannot use Social Login (via OAuth) functionality in this simple WebView app.

Even if there might be a workaround for this issue, I think we can conclude that this is a different product. Therefore we might want to add it to our test automation framework. But it's an app, not a browser, so let's see what tweaks we need to make in our setup to make this work.

Testing the webview app

Since we now have an WebView app, we cannot use our current test automation setup: Ruby + selenium-webdriver + watir + lapis_lazuli setup.
Instead we need a setup like this: Ruby + appium_lib.
Meaning we should create a new test project for testing this mobile app. I could have set up my mobile website test automation with appium_lib as well, in which case we would be able to share/re-use most of the functions. But since it was decided in an earlier phase that to keep my desktop and mobile app tests aligned, this is not going to work for me.

Depending on the setup/scope of your project you can combine the mobile website and mobile WebApp tests together or put them in a separate project like I'm going to do. If you followed my previous post about mobile website testing at least Appium if up and running. And to connect to the phone via IRB is relatively easy, you only need to change a couple of capabilities to make this happen.

Comments

Popular posts from this blog

PowerShell - How to overcome Azure VM's fixed resolution limitation

TA Basics: Website Test Automation on mobile devices via Appium server

TA: Who doesn't like proxies? Me!