Visual test automation: mobile native (Part 1)

I feel I'm moving to next stage of my current "let's try this" project, so it's time to structure my current notes on what I've been doing for some time. This time it's visual test automation. It's one of the current trends with (possibly) the biggest player Applitools at the moment. Frankly, I love what Applitools have achieved and where they are going, and options they suggest look great for commercial projects. For non-commercial and not open source projects, especially when you are  learning new things, paying for cloud based services is not what you want. So I've decided to go another way and start with visual test automation for "works from my PC" kind of tests.

Why visual test automation? Well, there were several main factors:
- it's interesting and new, I've never tried this;
- we have an app at work, which is not commercial product, but we need it to be stable and release bug fixes / new features fast;
- this app is mostly for displaying various graphs, statistics etc., so main requirement is "ensure information is displayed as expected"; this is really mostly about visual validation.

Limitations and requirements which we have:
- app is written in React Native;
- app runs on Android and iOS at the moment, web version will be released pretty soon;
- it should be black box testing;
- only minimal code changes can be made at the moment (by "minimal" we understand something like "missing id's or something like that can be added, but don't expect huge refactoring");
- testing framework should be such that testers who have minimal programming skills could be involved and use those tests as a way to learn automation;
- testing framework should enable options to write both visual validation tests and functional tests, only visual validation is not enough;
- we don't want to pay for any cloud services, libraries etc. at the moment.

My personal goals:
- "why not? This is interesting and new!"
- improve development skills (well, to be honest - I think I called this "write finally something in Java and start believing I can use this language" somewhere in my mind);
- very deeply hidden hope - "maybe I'll have something useful for others and will have something I can call 'my tiny personal open source project'";
- good chance to try Galen Framework, it's more about responsive design testing automation, but maybe it can be useful for us also.

After some research tools chosen:
- Java
- Galen Framework
- Appium Framework
- initial tests will be for running on Android, having in mind that they should be reused for iOS and maybe web. No iOS for a while as it seems to be much more complicated than Android according to various discussions on web.

Initial visible challenges:
- Galen Framework is a powerful tool with it's own syntax, object locators descriptions, configuration rules, reporting and very minimal example how to call it from Java tests. We want to integrate it into Java tests, use Page Object model and to define objects only in single place.
- We have Android native app, no WebView. Lots of mobile apps automation samples start with "switch to WebView and..." - we have no such option, so there will be some challenges.
- I know nothing about Appium.
- I'm new to Java.

This is where I've started and how it looked at the moment. How it really looked like - see next posts in the future.

Comments

Popular posts from this blog

Migrate Protractor E2E tests to async / await

Allure reporter, Gradle and JUnit5

Protractor, Jasmine and promises for non-browser functions