Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar

169 views

Published on

When I demo’ed what is now called Appium at the Selenium Conference in 2012 I had no idea what I was doing starting an open source project. I knew little about how open source operated and worked behind the scenes. Thanks to the help of a great community and the advice of some seasoned open source contributors, Appium has quickly become the most popular open source mobile automation framework. Along the way, mistakes were made, lessons were learned, and occasionally we got things right. I’ve put together a collection of stories and lessons that I’d like to share with others to help everyone manage, contribute to, and consume open source software projects more effectively.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar

  1. 1. STARTING AN OPEN SOURCE PROJECT: 0 TO 100,000 USERS AN EX-MICROSOFTEE ACCIDENTALLY CREATES A WILDLY POPULAR OPEN SOURCE PROJECT
  2. 2. ABOUT THE SPEAKER Dan Cuellar • Creator of Appium • Head of Software Testing at FOODit • Previously at Shazam, Zoosk, and Microsoft • BS in Computer Science from Carnegie Mellon
  3. 3. THE MOST TERRIFYING 5 WORDS IN TESTING
  4. 4. THIS ALL SOUNDS FAMILIAR
  5. 5. EVERYTHING IS NOT AWESOME
  6. 6. WHAT IS APPIUM • An implementation of the Selenium JSON-wire protocol that controls native and hybrid iOS and Android application • The most popular open source mobile functional testing framework
  7. 7. APPIUM PHILOSOPHY • Use standardized and sanctioned APIs and techniques • Code in the language of your choice • Java, C#, Python, Ruby, Objective-C, node.js, PHP, and more • Do not modify the application under test • Keep it free and open source
  8. 8. HOW DOES IT WORK? UIAutomation / UIAutomator Appium Server Test Script JSON-Wire Protocol Request JSON-Wire Protocol Response HTTP
  9. 9. @Before public void setUp() throws Exception { // set up appium File app = new File("/path/to/your/TestApp.app"); DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("platformVersion", ”9.1"); capabilities.setCapability("deviceName", "iPhone 6"); capabilities.setCapability("app", app.getAbsolutePath()); driver = new IOSDriver<WebElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); } THE CODE – IOS SETUP
  10. 10. @Before public void setUp() throws Exception { // set up appium File app = new File(”/path/to/my/test-app.apk"); DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("deviceName","Android Emulator"); capabilities.setCapability("automationName",”Android"); capabilities.setCapability("app", app.getAbsolutePath()); capabilities.setCapability("appPackage", ”com.yourcompany.testapp"); capabilities.setCapability("appActivity", ".HomeScreenActivity"); driver = new AndroidDriver<WebElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); } THE CODE – ANDROID SETUP
  11. 11. WebElement el = driver.findElement(By.className("UIAButton")); WebElement el = driver.findElement(By.xpath("//UIATextField[1]")); WebElement el = driver.findElement(MobileBy.AccessibilityId("Done")); THE CODE – FINDING ELEMENTS
  12. 12. el.click(); el.sendKeys("Hello World"); driver.swipe(sliderLocation.getX(), sliderLocation.getY(), sliderLocation.getX()-100, sliderLocation.getY(), 1000); THE CODE – ACTIONS
  13. 13. Each webview in your app is a context. Change context and automate as you would a webpage using regular selenium syntax. driver.context(contextName); WebElement el = driver.findElement(By.cssSelector(".awesome")); el.click(); AUTOMATING WEB-VIEWS
  14. 14. TIME TO SPREAD THE WORD
  15. 15. GETTING THE WORD OUT • Answered almost every forum question for the 1st year of the project • Answered most StackOverflow questions • Spoke at any conference that would have us • Stated our mission and philosophy • Talked to companies that were interested • Utilized Twitter and social media
  16. 16. LOSING CONTROL IS A GOOD SIGN • One day a website and twitter account showed up • Android support was added • The code was ported to another language • I lost commit privileges on the repo (briefly) • My conference proposal was rejected because, unbeknownst to me, two other people had already submitted Appium talks at the same conference
  17. 17. SCALABILITY • Eventually, you won’t be able to answer every question • Other people will have learned from reading the forums and the community can answer • You won’t be able to test or scrutinize every commit • Unit tests are your friend • You won’t know the what’s on anymore • Draft good release note • Keep detailed commit messages
  18. 18. STARTING AN OPEN SOURCE PROJECT THE WRONG WAY • Use proprietary technologies • Share the code via email • Provide no documentation • Do not post slides • Respond to issues via private communication THE RIGHT WAY • Use open technologies • Post code on GitHub • Write documentation • Use Slideshare & YouTube • Post responses on forums
  19. 19. CONFLICT • Agreeing to a philosophy and/or mission beforehand is helpful • There is no rigid chain of command to resolve disputes • Conflict is best kept out in the open • This leads to debate which results in better decisions • Transparent decision making leads to better end-user understanding • Sometimes whoever writes the code make the decision • People may have opinions but aren’t willing to code the solution
  20. 20. WHEN PEACE IS NOT AN OPTION • Losing contributors is bad, but not the end of the world • Unless they leave the open source community, their work is still shared with everyone • Multiple projects doing the same thing isn’t necessarily a bad thing • Choice and competition brings about innovation • Having options is good for end-users In the end, the most awesome thing will win
  21. 21. BY THE NUMBERS In the last 3 years • Over 3,000 Stars, 2,000 Forks on GitHub • Over 150 Contributors and 5,000 commits • Over 150,000 downloads of Appium 1.0 • Over 3,000 issues closed
  22. 22. WHAT’S NEW IN APPIUM 1.5? • Complete rewrite of the entire codebase • Continuous Integration and Unit Tests • Command line arguments are mostly capabilities now • Code of Conduct and Governance
  23. 23. WHY REWRITE? • 3 years of patches and organic growth • Many complaints about instability • Code was not modular enough • Old and confusing ES5 code • Callback Hell • Poorly Tested
  24. 24. WHAT’S COMING NEXT • Windows Phone and Windows 10 application support • New GUIs • Multiple New iOS Backends • Android backend rewrite using UIAutomator 2 • Better docs and onboarding material • Appium Foundation
  25. 25. WHY DOES APPIUM SUCCEED? • From Day 1, There Was a Clear Philosophy and Vision • We try to be as inclusive as possible to foster an active community • We support many languages and platforms as • Our tool is based on an existing tool people are already familiar with • We put a whole lot of work into it • We speak at any and every conference that will have us • We contribute a lot of our unpaid time into the product
  26. 26. INCLUSIVENESS
  27. 27. INCLUSIVENESS
  28. 28. INCLUSIVENESS
  29. 29. INCLUSIVENESS
  30. 30. PERSONAL TAKEAWAY “Life can be much broader once you discover one simple fact: Everything around you that you call life was made up by people that were no smarter than you and you can change it, you can influence it, you can build your own things that other people can use. Once you learn that, you'll never be the same again.” -Steve Jobs
  31. 31. MORE INFO • Website: http://www.appium.io • Slack: appium.slack.com • Forum: discuss.appium.io • GitHub: http://www.github.com/appium/appium

×