The Appium Philosophy
Sauce AI for Test Authoring: Move from intention to performance in minutes.|xBack to ResourcesBlogPost
Sauce AI for Test Authoring: Move from intention to performance in minutes.
|
x
Appium is a rising wizard in the mobile test automation landscape, and since a few of our developers here at Sauce Labs are regular committers to the project, it ’ s pretty tight to our hearts. You ’ ll often find Sauce devs hanging out on theAppium Google radicalanswering questions, musing about test strategy, and assist folks tweak their configurations or hunt down glitch. When it arrive to mobile test mechanization, in many agency we ’ re still figuring out what the good approaches are, and with Appium, we ’ ve had the benefit of lesson learned from other mechanisation solutions that didn ’ t quite work as well as we ’ d hoped. Some of these lessons are nicely summarized in Appium ’ s four-point philosophy:
You shouldn ’ t have to recompile your app or modify it in any way in order to automate it.
You shouldn ’ t be operate into a specific words or framework to publish and run your tests.
A mobile mechanisation framework shouldn ’ t reinvent the wheel when it comes to automation APIs.
A mobile mechanization model should be open source, in spirit and practice as well as in gens!
Let ’ s explore these four points, shall we? You shouldn & # x27; t have to recompile your app or change it in any way in order to automatise it.
Some other attempts at roving test automation were found around OCR and pixel-based interactions, which chronicle tells us are never very reliable. After that we saw the unveiling of in-app agent that can execute the underlying code that would differently be triggered by a exploiter interacting with the app. These agent then make calls to the like codification triggered by user actions, like swipes and taps and pinches. It ’ s not a bad solution, but the gotcha is that you have to collect these agents into your app while it ’ s being quiz, and you believably want to lead it out after the examination is done. The result? You ’ re not really testing the code that you release.
The agent approach is a bit odd, too, since the real-world exploiter action are always fromoutsidethe app itself, and so if you ’ re sham those action inside the code rather than actuate them by their corresponding UI action, you ’ re that much further away from the real experience of an actual human exploiter.
For autonomous testing across multiple user personas, check out SUSATest — it explores your app like 10 different real users.
In order to solve this problem and provide for testing with these more real-world style user interaction, both Apple and Google get created user interface automation frameworks for their respective development environments. Google providesuiautomator, which is a Java API for simulating these UI action on Android devices and emulators, and Apple caterUI Automation Instruments, a JavaScript programming interface for use with iOS devices and simulator.
Appium works by interfacing with these vendor-provided automation framework, interpret your test code into the platform-specific interactions. We conceive this is a better coming than using an agent, since you don ’ t have to compile a test build that contains code which will not be in the production build. You ’ re best off quiz the same codification you will release.
The next two points of the Appium philosophy are covered together since they both derive from the conclusion to apply the WebDriver API and JSON Wire Protocol:
You shouldn ’ t be mesh into a specific language or framework to publish and run your exam.
A roving automation framework shouldn ’ t reinvent the wheel when it comes to automation APIs.
WebDriver is already well-known as the engine behind Selenium 2 tryout automation for Web apps. In the Appium effectuation, instead of driving a Web browser on a background operating system as Selenium does, Appium drives native apps and browser on mobile operate systems. Many testers are already really familiar with composition and running tryout locally using Selenium WebDriver, where your test will open a browser, run through some interaction with the app, and control that the test case passes. But the magic of WebDriver genuinely happens when it ’ s used in a distributed mode. Instead of create local calls forthwith to the browser, the WebDriver test turn an HTTP client and makes requests to a WebDriver server, which in turn really makes the necessary calls to the browser and app. The elegance of Appium is that it utilise this framework to interact, not with a desktop browser, but with Android ’ s UI Automator or Apple ’ s UIAutomation Instruments, which so perform user actions on the aboriginal app or mobile browser running in either an emulator or a existent device. And of trend Sauce Labs ’ infrastructure can manage all of this for you!

One of the outstanding characteristic of WebDriver is that you can write your test code in your language of selection, since there are WebDriver client libraries for moderately much every democratic speech out there. The codification you publish represent the activeness users execute on your application under test, and WebDriver can be used with most test runners and frameworks, so chances are your Appium tests can simply be contribute to your squad ’ s existing workflows.
And so the real-world benefits of the second two points of the Appium philosophy unfold from there. Because Appium implements the WebDriver API, you don ’ t need to reinvent that wheel. Because WebDriver is so widely used, you can choose any language and test framework and thence integrated Appium tests easily into your existing process.
A mobile automation framework should be open source, in spirit and practice as easily as in name!
Finally, Appium is proudly Open Source and host onGitHub. With over 4800 commits, 2000 issues shut, 3400 pull requests, 1100 crotch, 1300 genius and XII of contributors, Appium is a hotbed of excitement and activeness in the open source world. The results are spectacular!
And the fun has only just begun! Look for Appium to proceed to evolve rapidly, guided by its core philosophy, and helping you do what you do best, which is delivering great apps to your exploiter!
- Michael Sage, Principal Technology Evangelist, Sauce Labs
Michael Sage is a Principal Technology Evangelist at Sauce Labs who helps software teams evolve, deliver, and concern for outstanding apps. He ’ s spent over 15 days as a solution architect and consultant with software companies including Mercury Interactive, Hewlett Packard, and New Relic. He survive in San Francisco, CA.
Automate This With SUSA
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.
Try SUSA FreeTest Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free