testistanbul 2016 - keynote: "the story of appium" by dan cuellar
TRANSCRIPT
![Page 1: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/1.jpg)
STARTING ANOPEN SOURCE
PROJECT:0 TO 100,000
USERSAN EX-MICROSOFTEE ACCIDENTALLY CREATES
A WILDLY POPULAR OPEN SOURCE PROJECT
![Page 2: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/2.jpg)
ABOUT THE SPEAKERDan Cuellar• Creator of Appium• Head of Software Testing at FOODit• Previously at Shazam, Zoosk, and Microsoft• BS in Computer Science from Carnegie Mellon
![Page 3: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/3.jpg)
![Page 4: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/4.jpg)
Evolution
![Page 5: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/5.jpg)
THE MOST TERRIFYING 5 WORDS IN TESTING
![Page 6: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/6.jpg)
THIS ALL SOUNDS FAMILIAR
![Page 7: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/7.jpg)
EVERYTHING IS NOT AWESOME
![Page 8: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/8.jpg)
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
![Page 9: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/9.jpg)
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
![Page 10: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/10.jpg)
HOW DOES IT WORK?UIAutomation /
UIAutomator
AppiumServer
Test Script
JSON-Wire Protocol Request
JSON-Wire Protocol Response
HTTP
![Page 11: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/11.jpg)
@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
![Page 12: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/12.jpg)
@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
![Page 13: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/13.jpg)
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
![Page 14: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/14.jpg)
el.click();
el.sendKeys("Hello World");
driver.swipe(sliderLocation.getX(), sliderLocation.getY(), sliderLocation.getX()-100, sliderLocation.getY(), 1000);
THE CODE – ACTIONS
![Page 15: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/15.jpg)
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
![Page 16: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/16.jpg)
TIME TO SPREAD THE WORD
![Page 17: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/17.jpg)
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
![Page 18: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/18.jpg)
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 alreadysubmitted Appium talks at the same conference
![Page 19: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/19.jpg)
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
![Page 20: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/20.jpg)
STARTING AN OPEN SOURCE PROJECTTHE 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
![Page 21: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/21.jpg)
Handling Conflict
![Page 22: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/22.jpg)
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
![Page 23: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/23.jpg)
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
![Page 24: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/24.jpg)
Where Are We Now?
![Page 25: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/25.jpg)
BY THE NUMBERSIn 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
![Page 26: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/26.jpg)
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
![Page 27: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/27.jpg)
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
![Page 28: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/28.jpg)
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
![Page 29: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/29.jpg)
Questions?
![Page 30: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/30.jpg)
Takeaway
![Page 31: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/31.jpg)
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
![Page 32: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/32.jpg)
INCLUSIVENESS
![Page 33: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/33.jpg)
INCLUSIVENESS
![Page 34: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/34.jpg)
INCLUSIVENESS
![Page 35: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/35.jpg)
INCLUSIVENESS
![Page 36: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/36.jpg)
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
![Page 37: Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar](https://reader030.vdocuments.mx/reader030/viewer/2022020314/5889ad471a28aba54d8b4bf5/html5/thumbnails/37.jpg)
MORE INFO• Website: http://www.appium.io
• Slack: appium.slack.com
• Forum: discuss.appium.io
• GitHub: http://www.github.com/appium/appium