I’ve never had any doubts that automation testing is the future of software quality assurance. Gone are the days when automation testing frameworks were considered as an investment and we’re quickly coming to a stage where automation is no longer a ‘nice to have’ aspect in any project.
Having recently returned from Dreamforce after delivering a session on ‘Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework‘, I thought it would be worth sharing more insights on specific aspects of Salesforce1 mobile automation testing.
So, let’s just dive in to the key concepts.
A) Mobile automation is hard
Over the years, web automation frameworks have matured quickly. Seleinium has emerged as a de-facto standard and it’s no surprise that it caters well to the requirements of Salesforce application automation as well. Interesting, Selenium has a mobile version as well – catering only to Android called Selendroid.
I played around with Selendroid a lot earlier this year while trying to use it to create tests for the Force.com Mobile SDK for Android sample apps. However, the framework wasn’t simply mature enough and after several sleepless nights, I decided to continue my search for another better suited framework.
B) Hybrid Mobile automation is harder
While it’s easy to find tools such as Selendroid and similar counterparts for iOS which cater to native automation testing, there are not many tools for hybrid apps. I reckon there are 2 major reasons for this
- Hybrid apps run in a WebView container so essentially you do not have a native bridge connection
- Building a framework for WebDriver JSON protocol is harder than it sounds
Of course, there’s no denying that if you are building a hybrid app, customers will want you to use a hybrid automation framework which can work across multiple platforms. This does not really translate to the usual bull-shit principle of ‘Write Once, Run Everywhere’ but it does allow you to maintain consistency in chosing one framework for all your hybrid development and testing needs.
C) There are more devices and more screen sizes than you can imagine
If manual testing across an endless number of devices, screen sizes, resolutions and retina/ non-retinas wasn’t enough, how on earth can you imagine an automation framework taking care of such nuisances.
Either way, my endless search led me to a new emerging open source framework called Appium.
The working principle of Appium is very simple – it runs a HTTP Server managing WebDriver sessions and listens for commands, executes on device/ simulator and sends back a HTTP response.
The setup process is a breeze. Just download the package from the site as shown below.
Extract the package and you should be good to go.
If you are a node fan (like yours truly), you can pull it down using npm
I strongly recommend trying some simpler Appium sample apps before you get into using Appium with Salesforce1 Mobile SDK apps. In the next post, I will cover how you can use Appium with sample Mobile SDK apps to run some basic UI tests.
Happy Automation testing till then!