SlideShare a Scribd company logo
Python for reliable delivery of cross-
platform developer products
@avidas
Speaker
 Ananya (Avi) Das
 Engineer at Braintree, a
PayPal company
 Developer experience, SDKs
and platform infrastructure
 Austin, Texas
Introduction
 Cross platform: One use case can involve multiple
devices, mobile/client-side web/server side
 Does it work?
 Where are the pain points?
 Health of APIs and SDKs
 Live, Sandbox and Stage environments
Overview
 Build a minimum viable testing pipeline
Product
 One Touch reduces friction in payments by preserving
identity across apps or sites
 Fewer Screens, better conversion
Python reliable delivery
Python reliable delivery
Client Side
Server Side
Python reliable delivery
requirements.txt
 mobile/web automation
 enable product/marketing to write tests describing
expected behavior
 communicate current health of the platform via
dashboards/charts
Architecture
Start
 PHP
 Became obvious that PHP was not general purpose
enough for our requirements
 Switch to Python and have worked very well for us
Automation
 Appium for iOS/Android automation
 Follows the WebDriver API similar to Selenium
 Can automate mobile native, mobile web and mobile
hybrid apps
Code Example
http://bit.ly/1Hls0Hg
Check out v0.1.0 tag of repo
Tests an iOS app (needs Xcode)
Needs Appium running (needs Node.js)
Python reliable delivery
Behavior Driven Testing
 Behave, a Python BDD framework
 Terminology: Features, Scenarios and
Steps, context
 Custom formatters for output
Example Behave Spec
Code Example
 Describe the previous Appium use case as a behave test
 Check out v0.2.0 tag
Storage and Visualization
 ElasticSearch and Kibana
 JSON over HTTP interface
 Index, Mapping type
Install ElasticSearch (OSX)
 brew install elasticsearch && brew info elasticsearch
 launchctl load
~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.p
list
Create elasticsearch index
Create Elasticsearch Mapping
 es.indices.put_mapping(doc_type='behave',
body=mappingJson, index=['reliability'])
Python reliable delivery
Submit to ElasticSearch
Code Example
 Getting the behavior driven test data into ElasticSearch
and display on Kibana
 Check out v0.3.0 tag
Kibana
 Open source data visualization platform
 Wide variety of graphs and charts out of the box
 Benefits from ElasticSearch’s extensive search and
analytics abilities
 Negatives: Sacrifices some configurability in the latest
major 4.0 e.g. Modifying labels/colors is not possible yet
Install Kibana
 brew install kibana && brew info kibana
 launchctl load
~/Library/LaunchAgents/homebrew.mxcl.kibana.plist
Python reliable delivery
Python reliable delivery
Continuous Integration(CI)
 Jenkins gets latest copy of the code and runs the end to
end test cases
 Admin interface for configuring to run jobs at set cadence
and monitor run history
Takeaways
 Python’s ease of learning ensured team members adept in
other technologies/platforms could contribute
 Appium is a Node app, ElasticSearch written in Java,
Behave in Python, Kibana in Node. All have officially
supported Python bindings.
 Get to production fast and iterate
Future work
 Improve alerting e.g. send meaningful alerts via
email/Slack
 Release components to Open source community
 Expand usage to other products
Contributors
 Jason Ziaja (@jziaja)
 Jay Patel (@jaypatel512)
 Juwon Lee (@juwlee)
 Matt Jacunski (@mattjacunski)
 Avi Das (@avidas)
Thank you!
 https://www.braintreepayments.com/features/one-touch
 www.braintreepayments.com
 Avi Das (@avidas)
 Questions?

More Related Content

PDF
Creating Interactive Docs with Postman
PDF
James Baxley - Statically typing your GraphQL app
PDF
Building Cloud-agnostic Serverless APIs
PDF
Rescale New Feature: Bring Your Own VPC
PDF
AWS Community Day - Piyali Kamra - Conversational AI Ecosystem on AWS
PDF
Serverless Containers
PPTX
AWS Fargate AWS UG Dormund 2019 Kazulkin Jung
PDF
Continuous delivery in AWS
Creating Interactive Docs with Postman
James Baxley - Statically typing your GraphQL app
Building Cloud-agnostic Serverless APIs
Rescale New Feature: Bring Your Own VPC
AWS Community Day - Piyali Kamra - Conversational AI Ecosystem on AWS
Serverless Containers
AWS Fargate AWS UG Dormund 2019 Kazulkin Jung
Continuous delivery in AWS

What's hot (19)

PDF
Airflow techtonic template
PDF
PayPal's History of Microservices Architecture
PPTX
“ASP.NET Core. Features and architecture”
PPTX
North Point Geographic Solutions - ArcPAD SQL Server
PDF
GraphQL: The Missing Link Between Frontend and Backend Devs
PDF
Nils Rhode - Does it always have to be k8s - TeC Day 2019
PPTX
C# Code Samples
PDF
Modern Tools for API Testing, Debugging and Monitoring
PDF
Devops implementation for a leading education company
PDF
The what why and how of web analytics testing
PPTX
C# Scripting with Microsoft's Project Roslyn
PDF
apidays LIVE Jakarta - Better API DX with a CLI by Phil Nash, Twilio
PDF
4 Major Advantages of API Testing
PPTX
Into to GraphQL
PPTX
Automated tests to a REST API
PPTX
API Gateway with legend lambada
PDF
Manage any AWS resources with Terraform 0.12 - April 2020
PPTX
.Net Conf CO v2017- Arquitecturas serverless con Azure Functions, Logic Apps ...
PDF
API Testing: The heart of functional testing" with Bj Rollison
Airflow techtonic template
PayPal's History of Microservices Architecture
“ASP.NET Core. Features and architecture”
North Point Geographic Solutions - ArcPAD SQL Server
GraphQL: The Missing Link Between Frontend and Backend Devs
Nils Rhode - Does it always have to be k8s - TeC Day 2019
C# Code Samples
Modern Tools for API Testing, Debugging and Monitoring
Devops implementation for a leading education company
The what why and how of web analytics testing
C# Scripting with Microsoft's Project Roslyn
apidays LIVE Jakarta - Better API DX with a CLI by Phil Nash, Twilio
4 Major Advantages of API Testing
Into to GraphQL
Automated tests to a REST API
API Gateway with legend lambada
Manage any AWS resources with Terraform 0.12 - April 2020
.Net Conf CO v2017- Arquitecturas serverless con Azure Functions, Logic Apps ...
API Testing: The heart of functional testing" with Bj Rollison
Ad

Similar to Python reliable delivery (20)

DOCX
Kamala_latest_CV
PDF
Going FaaSter, Functions as a Service at Netflix
ODP
Intro To Spring Python
PPTX
Netflix Cloud Architecture and Open Source
PDF
Release with confidence
PPTX
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx
PPT
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).ppt
PPTX
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
PPT
ASP.NET AJAX with Visual Studio 2008
DOCX
Kunal bhatia resume mass
PDF
Java Test Automation for REST, Web and Mobile
PPTX
Play framework : A Walkthrough
DOCX
All the amazing features of asp.net core
PDF
ASP.NET Core Interview Questions PDF By ScholarHat.pdf
PPT
Native Mobile Application Using Open Source
PPT
OSCON Titanium Tutorial
PPT
내꺼내꺼
PDF
RAHUL_Updated( (2)
PPTX
Technology Stack Discussion
PDF
Prototyping applications with heroku and elasticsearch
Kamala_latest_CV
Going FaaSter, Functions as a Service at Netflix
Intro To Spring Python
Netflix Cloud Architecture and Open Source
Release with confidence
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).ppt
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
ASP.NET AJAX with Visual Studio 2008
Kunal bhatia resume mass
Java Test Automation for REST, Web and Mobile
Play framework : A Walkthrough
All the amazing features of asp.net core
ASP.NET Core Interview Questions PDF By ScholarHat.pdf
Native Mobile Application Using Open Source
OSCON Titanium Tutorial
내꺼내꺼
RAHUL_Updated( (2)
Technology Stack Discussion
Prototyping applications with heroku and elasticsearch
Ad

Recently uploaded (20)

PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
Geodesy 1.pptx...............................................
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPT
Project quality management in manufacturing
PPT
introduction to datamining and warehousing
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Sustainable Sites - Green Building Construction
PPT
Mechanical Engineering MATERIALS Selection
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
web development for engineering and engineering
PPTX
Lecture Notes Electrical Wiring System Components
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Geodesy 1.pptx...............................................
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
OOP with Java - Java Introduction (Basics)
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Project quality management in manufacturing
introduction to datamining and warehousing
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Automation-in-Manufacturing-Chapter-Introduction.pdf
CH1 Production IntroductoryConcepts.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Operating System & Kernel Study Guide-1 - converted.pdf
Sustainable Sites - Green Building Construction
Mechanical Engineering MATERIALS Selection
bas. eng. economics group 4 presentation 1.pptx
web development for engineering and engineering
Lecture Notes Electrical Wiring System Components

Python reliable delivery

Editor's Notes

  • #3: First time speaking at a conference At various points switch between browser, live coding, and slides. Please shout out if fonts are too low.
  • #5: Use Python to automate iOS app via Appium Use Behave, a Python BDD framework, as a way to describe tests for better communication Storage of test data via ElasticSearch Visualization of results on Kibana Pycon is really great because there are people working in all these different fields, finance, healthcare, climate. My goal with this talk is that some of you may learn something useful in this talk that you can then go back and use in your work or hobby project
  • #6: We are well known for serving a broad set of use cases across payments industry The whole product depends on a multitude of distributed teams working on individual components Your customers will log in just once per device and then instantly complete purchases across other apps or sites. They’ll see fewer screens, which could mean better conversion for you.
  • #7: In this Video, an user chooses to pay with PayPal in a merchant application, at which point it switches to browser, where user grants consent and it comes right back to the app. If you are selling on mobile, this is huge since there is no entering credentials, typing in credit card numbers. Less friction, more sales
  • #8: These are just some of our awesome partners who using this in production
  • #9: How does this work
  • #12: So let’s look at our requirements
  • #14: This is not a gripe on the language, but just the ecosystem is focused most on web pages than anything else Might be good language
  • #15: Who here have used Appium? The context under which you test will inform you of the specific choice of testing methodology and test tools to choose. The more options you are aware of, the better your context specific choice is going to be.
  • #16: OSX only
  • #18: Allows us to communicate the tests across product, management, business stakeholders `context` used to pass state across steps
  • #19: ----- Meeting Notes (11/8/15 12:47) ----- Feature is
  • #21: By default, Behave reports result as print out but we needed json formatting as it is a better cross platform data format. Extended Behave PrettyJSONFormatter Based on the Lucene Search Index This is not the most common use for ElasticSearch, most common use case is full-text search Not just for full-text search Supports authentication via add-ons such as Shield Extensive documentation and support E.g. A blogging platform may store data in a single index and within it different mappings for user, blog, comments
  • #33: PRs from people who do not write Python on day to day basis. Biggest win developers with core competencies in languages such as php, .net, java could get productive fast. Optimize for developer happiness. Productivity, beauty and brevity. Use plain language PHP or Java
  • #34:  we are discovering problems faster, and seeing where existing test framw integrate with good alerting Such as Pay With Venmo Test different versions of sdks, different versions of APIs
  • #36: The tools used here worked well in conjunction with the use cases we have Doesn’t mean there aren’t better ways to do it Open to feedback and improving the pipeline