Попытка раскрытия темы одного из самых перспективных инструментов автоматизации тестирования мобильных приложений. Реализация параллельного прогона одних и тех же тестов на разных мобильных платформах с его помощью. Грабли, по которым придется идти в процессе. И стоит ли игра свеч?
2. Who?
Yaroslav
Pernerovskyy
Test Automation Lead in
Global Logic
Trainer in QA Factory
y.pernerovskyy
ypernerovskyy@qafactory.com.ua
www.linkedin.com/pub/yaroslav-pernerovsky/1/9b5/55
4. Why?
Web application
Selenium based test framework (Java)
iOS and Android clients
Reuse framework features for mobile
Open Source (Free of charge)
Easy setup and configuration
Scalable and flexible
5. Appium Rules
Test the same app you submit to the
marketplace
Write your tests in any language, using any
framework
Use a standard automation specification and
API
Build a large and thriving open-source
community effort
http://appium.io/slate/en/master/?ruby#appium-philosophy
6. iOS
Android
Firefox OS
Test Script
JSON Wire
protocol
How it works
Native
automation
instruments
Remote Web
Driver
node.js
UiAutomator
Selendroid
Instruments
Marionette
7. Native automation instruments
Android: UiAutomator (4.2), Selendroid (2.3)
iOS: UIAutomation
Firefox OS: Marionette
Emulators/simulators and real devices
Web Driver API
Selenium Grid
Ruby, Python, Java, JavaScript, PHP, C#...
Documentation
http://appium.io/
Features
12. Issues
Stability issues
Actions depends on platform
Problems with accessing some elements
iOS specific issues
Single app test
Hardware keys support
One emulator instance
xpath issue
14. Web apps
Similar layouts
Same locators
Absolutely the same tests can be executed
Not require additional efforts
15. Native apps
Different layout
Different locators
Platform specific UI elements
Test cases should be specially designed
Require additional efforts
16. Test environment
SVN
Jenkins
Web Firefox
Web Chrome
Mobile iOS
Mobile Android
……
Selenium
Grid
Chrome, FF
IE
Safari
adb
iPad simulator
iPhone simulator
Nexus 7
Nexus 5
Appiumreports
17. Selenium
Test framework overview
class Drivers
class Bindings
Page Objects
Page Objects
Page Objects
Page Objects
Tests
Tests
Tests
Tests
Global Configuration
Test data
loggers/db tools/service tools
etc.
18. Tests
Test steps should be similar for both platforms
@Test (dataProvider = "Logins")
public void verify_Incorrect_Login(Map<String, String> testData){
loginScreen.verifyScreenLoaded();
loginScreen.submitLogin(testData.get("User"),testData.get("Password"));
loginScreen.verifyAndCloseErrorMessage(testData.get("Message"));
loginScreen.verifyScreenLoaded();
}
19. Page Objects
Do not hardcode locators in Page objects
Store it in external object
Implement platform specific code
Create bindings for platform specific actions
25. Summary
WebDriver concept
Cross platform
Open Source
Easy integration into existed frameworks
It Works!
Has issues
But it works!
With some additional efforts it is possible to execute
exactly the same tests on different platforms