37
STARTING AN OPEN SOURCE PROJECT: 0 TO 100,000 USERS AN EX-MICROSOFTEE ACCIDENTALLY CREATES A WILDLY POPULAR OPEN SOURCE PROJECT

Dan Cuellar

Embed Size (px)

Citation preview

STARTINGANOPENSOURCEPROJECT:

0TO100,000USERSANEX-MICROSOFTEEACCIDENTALLYCREATESAWILDLYPOPULAROPENSOURCEPROJECT

ABOUTTHESPEAKER

DanCuellar• CreatorofAppium• HeadofSoftwareTestingatFOODit• PreviouslyatShazam,Zoosk,andMicrosoft• BSinComputerSciencefromCarnegieMellon

THEMOSTTERRIFYING5WORDSINTESTING

THISALLSOUNDSFAMILIAR

EVERYTHINGISNOTAWESOME

WHATISAPPIUM

• AnimplementationoftheSeleniumJSON-wireprotocolthatcontrolsnativeandhybridiOSandAndroidapplication• Themostpopularopensourcemobilefunctionaltestingframework

APPIUM PHILOSOPHY• UsestandardizedandsanctionedAPIsandtechniques

• Codeinthelanguageofyourchoice• Java,C#,Python,Ruby,Objective-C,node.js,PHP,andmore

• Donotmodifytheapplicationundertest

• Keepitfreeandopensource

HOWDOESITWORK?UIAutomation /UIAutomator

AppiumServer

TestScript

JSON-WireProtocolRequest

JSON-WireProtocolResponse

HTTP

@Before

publicvoidsetUp()throwsException{

//setupappiumFileapp=newFile("/path/to/your/TestApp.app");DesiredCapabilities capabilities=newDesiredCapabilities();capabilities.setCapability("platformVersion",”9.1");capabilities.setCapability("deviceName","iPhone6");capabilities.setCapability("app",app.getAbsolutePath());

driver=newIOSDriver<WebElement>(newURL("http://127.0.0.1:4723/wd/hub"),capabilities);}

THECODE– IOSSETUP

@BeforepublicvoidsetUp()throwsException{

//setupappiumFileapp=newFile(”/path/to/my/test-app.apk");DesiredCapabilities capabilities=newDesiredCapabilities();capabilities.setCapability("deviceName","AndroidEmulator");capabilities.setCapability("automationName",”Android");capabilities.setCapability("app",app.getAbsolutePath());capabilities.setCapability("appPackage",”com.yourcompany.testapp");capabilities.setCapability("appActivity",".HomeScreenActivity");

driver=newAndroidDriver<WebElement>(newURL("http://127.0.0.1:4723/wd/hub"),capabilities);

}

THECODE– ANDROIDSETUP

WebElement el=driver.findElement(By.className("UIAButton"));

WebElement el=driver.findElement(By.xpath("//UIATextField[1]"));

WebElement el=driver.findElement(MobileBy.AccessibilityId("Done"));

THECODE– FINDINGELEMENTS

el.click();

el.sendKeys("HelloWorld");

driver.swipe(sliderLocation.getX(),sliderLocation.getY(),sliderLocation.getX()-100,sliderLocation.getY(),1000);

THECODE– ACTIONS

Eachwebview inyourappisacontext.Changecontextandautomateasyouwouldawebpageusingregularseleniumsyntax.

driver.context(contextName);WebElement el=driver.findElement(By.cssSelector(".awesome"));el.click();

AUTOMATINGWEB-VIEWS

TIMETOSPREADTHEWORD

GETTINGTHEWORDOUT• Answeredalmosteveryforumquestionforthe1st yearoftheproject• AnsweredmostStackOverflow questions• Spokeatanyconferencethatwouldhaveus• Statedourmissionandphilosophy• Talkedtocompaniesthatwereinterested• UtilizedTwitterandsocialmedia

LOSINGCONTROLISAGOODSIGN• Onedayawebsiteandtwitteraccountshowedup• Androidsupportwasadded• Thecodewasportedtoanotherlanguage• Ilostcommitprivilegesontherepo(briefly)• Myconferenceproposalwasrejectedbecause,unbeknownsttome,twootherpeoplehadalreadysubmitted Appium talksatthesameconference

SCALABILITY• Eventually,youwon’tbeabletoanswereveryquestion• Otherpeoplewillhavelearnedfromreadingtheforumsandthecommunitycananswer

• Youwon’tbeabletotestorscrutinizeeverycommit• Unittestsareyourfriend

• Youwon’tknowthewhat’sonanymore• Draftgoodreleasenote• Keepdetailedcommitmessages

STARTINGANOPENSOURCEPROJECTTHEWRONGWAY

• Useproprietarytechnologies• Sharethecodeviaemail• Providenodocumentation• Donotpostslides• Respondtoissuesviaprivatecommunication

THERIGHTWAY• Useopentechnologies

• PostcodeonGitHub• Writedocumentation• UseSlideshare &YouTube• Postresponsesonforums

CONFLICT• Agreeingtoaphilosophyand/ormissionbeforehandishelpful• Thereisnorigidchainofcommandtoresolvedisputes

• Conflictisbestkeptoutintheopen• Thisleadstodebatewhichresultsinbetterdecisions• Transparentdecisionmakingleadstobetterend-userunderstanding

• Sometimeswhoeverwritesthecodemakethedecision• Peoplemayhaveopinionsbutaren’twillingtocodethesolution

WHENPEACEISNOTANOPTION• Losingcontributorsisbad,butnottheendoftheworld• Unlesstheyleavetheopensourcecommunity,theirworkisstillsharedwitheveryone

• Multipleprojectsdoingthesamethingisn’tnecessarilyabadthing• Choiceandcompetitionbringsaboutinnovation• Havingoptionsisgoodforend-users

Intheend,themostawesomethingwillwin

BYTHENUMBERS

Inthelast3years• Over3,000Stars,2,000ForksonGitHub• Over150Contributorsand5,000commits• Over150,000downloadsofAppium 1.0• Over3,000issuesclosed

WHAT’SNEWINAPPIUM 1.5?

• Completerewriteoftheentirecodebase• ContinuousIntegrationandUnitTests• Commandlineargumentsaremostlycapabilitiesnow• CodeofConductandGovernance

WHYREWRITE?

• 3yearsofpatchesandorganicgrowth• Manycomplaintsaboutinstability• Codewasnotmodularenough• OldandconfusingES5code• CallbackHell• PoorlyTested

WHAT’SCOMINGNEXT• WindowsPhoneandWindows10applicationsupport• NewGUIs• MultipleNewiOSBackends• AndroidbackendrewriteusingUIAutomator 2

• Betterdocsandonboardingmaterial• Appium Foundation

WHYDOESAPPIUM SUCCEED?

• FromDay1,ThereWasaClearPhilosophyandVision• Wetrytobeasinclusiveaspossibletofosteranactivecommunity• Wesupportmanylanguagesandplatformsas• Ourtoolisbasedonanexistingtoolpeoplearealreadyfamiliarwith

• Weputawholelotofworkintoit• Wespeakatanyandeveryconferencethatwillhaveus• Wecontributealotofourunpaidtimeintotheproduct

INCLUSIVENESS

INCLUSIVENESS

INCLUSIVENESS

INCLUSIVENESS

PERSONALTAKEAWAY“Lifecanbemuchbroaderonceyoudiscoveronesimplefact:Everythingaroundyouthatyoucalllifewasmadeupbypeoplethatwerenosmarterthanyouandyoucanchangeit,youcaninfluenceit,youcanbuildyourownthingsthatotherpeoplecanuse.

Onceyoulearnthat,you'llneverbethesameagain.”

-SteveJobs

MOREINFO• Website:http://www.appium.io

• Slack:appium.slack.com

• Forum:discuss.appium.io

• GitHub:http://www.github.com/appium/appium