Upload
turkish-testing-board
View
87
Download
0
Embed Size (px)
Citation preview
STARTING ANOPEN SOURCE
PROJECT:0 TO 100,000
USERSAN EX-MICROSOFTEE ACCIDENTALLY CREATES
A WILDLY POPULAR OPEN SOURCE PROJECT
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
Evolution
THE MOST TERRIFYING 5 WORDS IN TESTING
THIS ALL SOUNDS FAMILIAR
EVERYTHING IS NOT AWESOME
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
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
HOW DOES IT WORK?UIAutomation /
UIAutomator
AppiumServer
Test Script
JSON-Wire Protocol Request
JSON-Wire Protocol Response
HTTP
@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
@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
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
el.click();
el.sendKeys("Hello World");
driver.swipe(sliderLocation.getX(), sliderLocation.getY(), sliderLocation.getX()-100, sliderLocation.getY(), 1000);
THE CODE – ACTIONS
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
TIME TO SPREAD THE WORD
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
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
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
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
Handling Conflict
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
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
Where Are We Now?
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
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
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
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
Questions?
Takeaway
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
INCLUSIVENESS
INCLUSIVENESS
INCLUSIVENESS
INCLUSIVENESS
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
MORE INFO• Website: http://www.appium.io
• Slack: appium.slack.com
• Forum: discuss.appium.io
• GitHub: http://www.github.com/appium/appium