SlideShare a Scribd company logo
•
•
•
•
•
•
•
UNIT TEST FRAMEWORK?
FUNCTIONAL TEST FRAMEWORK?
WHAT ABOUT BEHAVIOR DRIVEN DEVELOPMENT?
TEST DRIVEN DEVELOPMENT?
CAT DRIVEN DEVELOPMENT?
WHAT ABOUT DEPENDENT AND ORDERED TESTS?
WHO NEEDS TEST FRAMEWORKS!? JUST USE FUNCTIONS AND
WRITE EVERYTHING IN-LINE!
* In Daryl’s opinion. Subject to change based on future Daryl’s new information.
Create a test framework for OpenStack
Must be developed in Python
Must use open source libraries and tools
Should be capable of testing both JSON and XML
request/response content
Proof of Concept developed internally, but maintained in
the long term by the community
Initial focus was Compute, but should be able to be used to
test any OpenStack project
•
•
•
•
Python
unittest
Base Test Fixtures
pytest nosetest
httplib2
Zodiac OpenStack
Language Bindings
Paramiko
Linux Instance Validator
ConfigParser
Config Models
No prescribed
Python test runner
One monolithic
project
Single hard coded
configuration file
Poor logging
Credentials were
stored in the clear
Design a repeatable architecture for test and test
infrastructure
Initial focus was testing OpenStack, but should be able to
be used to test all internal projects at Rackspace
Must be developed in Python
Must support multiple test runners
Should be extendable
Python
Test Runners
unittest pytest behave
App Drivers
Requests
(HTTP)
HTTPClient
AutoMarshalling
HTTPClient
Paramiko (SSH)
LinuxClient
pywinrm
(WinRM)
WindowsClient
Config Manager
Files Env Variables
Remote Instance Validation Client
Broke the single repository
pattern
Provided foundational
“drivers” for different types
of tests
Provided a pattern for
other teams to repeat with
their own test projects
Created a foundation for
discussions on future API
testing practices
Composites
Cafe Projects
Creating confusing
naming conventions
Being prescriptive
when not necessary
Some components
features exceeded
by alternatives
Serialization code
was tedious
Lack of
documentation and
self testing
You can extend the
framework…in any
way we tell you to
Test runner A test model Assertions
Means of interacting
with the application
under test
Handling of test
data
Handling of test
results
cafe-runner and
cafe-parallel
unittest.TestCase unittest
cafe-http-plugin
cafe.configurator.
TestEnvManager
cclogging and
cafe.reporting
cafe-runner and
cafe-parallel
unittest.TestCase unittest
cafe-http-plugin
cafe.configurator.
TestEnvManager
cclogging and
cafe.reporting
Test Runner Test Model Assertions
Application Driver Test Data
Management
Test Artifact
Management
pytest unittest.TestCase Pyvows.expect
behest conflagration
Standard Python
logger and PyTest
result formatter
Test Runner Test Model Assertions
Application Driver Test Data
Management
Test Artifact
Management
Think modularly in
your test solutions
1
Encourage practices
over specific tools or
libraries
2
Don’t re-invent the
wheel (unless there
is no wheel)
3
That which is not
tested, documented,
and packaged does
not exist
4
Leave room for
experimentation
5
If you try to come
up with a solution
for everything, you
may end up pleasing
no one
6
•
•
•
•

More Related Content

What's hot

Perl Continous Integration
Perl Continous IntegrationPerl Continous Integration
Perl Continous Integration
Michael Peters
 
TDD for APIs @ Europython 2015, Bilbao by Michael Kuehne
TDD for APIs @ Europython 2015, Bilbao by Michael KuehneTDD for APIs @ Europython 2015, Bilbao by Michael Kuehne
TDD for APIs @ Europython 2015, Bilbao by Michael Kuehne
Michael Kuehne-Schlinkert
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework Introduction
Pekka Klärck
 
Robot Framework : Lord of the Rings By Asheesh M
Robot Framework : Lord of the Rings By Asheesh MRobot Framework : Lord of the Rings By Asheesh M
Robot Framework : Lord of the Rings By Asheesh M
Agile Testing Alliance
 
Releasing High Quality Packages - Longhorn PHP 2021
Releasing High Quality Packages - Longhorn PHP 2021Releasing High Quality Packages - Longhorn PHP 2021
Releasing High Quality Packages - Longhorn PHP 2021
Colin O'Dell
 
Introduction to Robot Framework – Exove
Introduction to Robot Framework – ExoveIntroduction to Robot Framework – Exove
Introduction to Robot Framework – Exove
Exove
 
Generic Test Automation Architecture
Generic Test Automation ArchitectureGeneric Test Automation Architecture
Generic Test Automation Architecture
TestingCR
 
Integration Testing Practice using Perl
Integration Testing Practice using PerlIntegration Testing Practice using Perl
Integration Testing Practice using Perl
Masaki Nakagawa
 
Smolder Introduction
Smolder IntroductionSmolder Introduction
Smolder Introduction
Michael Peters
 
Cucumber jvm best practices v3
Cucumber jvm best practices v3Cucumber jvm best practices v3
Cucumber jvm best practices v3
Ahmed Misbah
 
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan PeshovJavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel ZikmundDotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
Karel Zikmund
 
Automated Infrastructure Testing
Automated Infrastructure TestingAutomated Infrastructure Testing
Automated Infrastructure Testing
Ranjib Dey
 
Craftsmanship Workshop: Coding Kata
Craftsmanship Workshop: Coding KataCraftsmanship Workshop: Coding Kata
Craftsmanship Workshop: Coding Kata
Michael Ibarra
 
Testing JSF with Arquillian and Selenium
Testing JSF with Arquillian and SeleniumTesting JSF with Arquillian and Selenium
Testing JSF with Arquillian and Selenium
Lukáš Fryč
 
API Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonAPI Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj Rollison
TEST Huddle
 
Test automation with cucumber jvm
Test automation with cucumber jvmTest automation with cucumber jvm
Test automation with cucumber jvm
Nibu Baby
 
Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objectsBacking Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
ITD Systems
 
You Were Lied To About Optimization
You Were Lied To About OptimizationYou Were Lied To About Optimization
You Were Lied To About Optimization
Chris Tankersley
 
Arquillian - Integration Testing Made Easy
Arquillian - Integration Testing Made EasyArquillian - Integration Testing Made Easy
Arquillian - Integration Testing Made Easy
JBUG London
 

What's hot (20)

Perl Continous Integration
Perl Continous IntegrationPerl Continous Integration
Perl Continous Integration
 
TDD for APIs @ Europython 2015, Bilbao by Michael Kuehne
TDD for APIs @ Europython 2015, Bilbao by Michael KuehneTDD for APIs @ Europython 2015, Bilbao by Michael Kuehne
TDD for APIs @ Europython 2015, Bilbao by Michael Kuehne
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework Introduction
 
Robot Framework : Lord of the Rings By Asheesh M
Robot Framework : Lord of the Rings By Asheesh MRobot Framework : Lord of the Rings By Asheesh M
Robot Framework : Lord of the Rings By Asheesh M
 
Releasing High Quality Packages - Longhorn PHP 2021
Releasing High Quality Packages - Longhorn PHP 2021Releasing High Quality Packages - Longhorn PHP 2021
Releasing High Quality Packages - Longhorn PHP 2021
 
Introduction to Robot Framework – Exove
Introduction to Robot Framework – ExoveIntroduction to Robot Framework – Exove
Introduction to Robot Framework – Exove
 
Generic Test Automation Architecture
Generic Test Automation ArchitectureGeneric Test Automation Architecture
Generic Test Automation Architecture
 
Integration Testing Practice using Perl
Integration Testing Practice using PerlIntegration Testing Practice using Perl
Integration Testing Practice using Perl
 
Smolder Introduction
Smolder IntroductionSmolder Introduction
Smolder Introduction
 
Cucumber jvm best practices v3
Cucumber jvm best practices v3Cucumber jvm best practices v3
Cucumber jvm best practices v3
 
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan PeshovJavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
 
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel ZikmundDotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
DotNext 2017 in Moscow - Challenges of Managing CoreFX repo -- Karel Zikmund
 
Automated Infrastructure Testing
Automated Infrastructure TestingAutomated Infrastructure Testing
Automated Infrastructure Testing
 
Craftsmanship Workshop: Coding Kata
Craftsmanship Workshop: Coding KataCraftsmanship Workshop: Coding Kata
Craftsmanship Workshop: Coding Kata
 
Testing JSF with Arquillian and Selenium
Testing JSF with Arquillian and SeleniumTesting JSF with Arquillian and Selenium
Testing JSF with Arquillian and Selenium
 
API Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonAPI Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj Rollison
 
Test automation with cucumber jvm
Test automation with cucumber jvmTest automation with cucumber jvm
Test automation with cucumber jvm
 
Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objectsBacking Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
 
You Were Lied To About Optimization
You Were Lied To About OptimizationYou Were Lied To About Optimization
You Were Lied To About Optimization
 
Arquillian - Integration Testing Made Easy
Arquillian - Integration Testing Made EasyArquillian - Integration Testing Made Easy
Arquillian - Integration Testing Made Easy
 

Similar to What I Learned From Writing a Test Framework (And Why I May Never Write One Again)

Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
Mihai-Cristian Fratila
 
AWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for Developers
Amazon Web Services
 
Perforce on Tour 2015 - Optimising the Developer Pipeline: Deliver Faster & ...
Perforce on Tour 2015 -  Optimising the Developer Pipeline: Deliver Faster & ...Perforce on Tour 2015 -  Optimising the Developer Pipeline: Deliver Faster & ...
Perforce on Tour 2015 - Optimising the Developer Pipeline: Deliver Faster & ...
Perforce
 
Testing Testing everywhere
Testing Testing everywhereTesting Testing everywhere
Testing Testing everywhere
Antonio Robres Turon
 
Vinayak_Sdet_DevOps_Bigdata_5_years
Vinayak_Sdet_DevOps_Bigdata_5_yearsVinayak_Sdet_DevOps_Bigdata_5_years
Vinayak_Sdet_DevOps_Bigdata_5_years
Vinayaka V Ladwa
 
One to rule them all
One to rule them allOne to rule them all
One to rule them all
Antonio Robres Turon
 
Infrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfraInfrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfra
Tomislav Plavcic
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software Testing
Mohammed Moishin
 
How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.
Matt Eland
 
Emulators as an Emerging Best Practice for API providers
Emulators as an Emerging Best Practice for API providersEmulators as an Emerging Best Practice for API providers
Emulators as an Emerging Best Practice for API providers
Postman
 
NFV Testing
NFV TestingNFV Testing
A tale in automation (Puppet to Ansible)
A tale in automation (Puppet to Ansible)A tale in automation (Puppet to Ansible)
A tale in automation (Puppet to Ansible)
neptunerx
 
ONOS System Test - ONS2016
ONOS System Test - ONS2016ONOS System Test - ONS2016
ONOS System Test - ONS2016
Suibin Zhang
 
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
OPNFV
 
How to implement continuous delivery with enterprise java middleware?
How to implement continuous delivery with enterprise java middleware?How to implement continuous delivery with enterprise java middleware?
How to implement continuous delivery with enterprise java middleware?
Thoughtworks
 
The_Little_Jenkinsfile_That_Could
The_Little_Jenkinsfile_That_CouldThe_Little_Jenkinsfile_That_Could
The_Little_Jenkinsfile_That_Could
Shelley Lambert
 
Api testing libraries using java script an overview
Api testing libraries using java script   an overviewApi testing libraries using java script   an overview
Api testing libraries using java script an overview
vodQA
 

Similar to What I Learned From Writing a Test Framework (And Why I May Never Write One Again) (20)

Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
AWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for Developers
 
Perforce on Tour 2015 - Optimising the Developer Pipeline: Deliver Faster & ...
Perforce on Tour 2015 -  Optimising the Developer Pipeline: Deliver Faster & ...Perforce on Tour 2015 -  Optimising the Developer Pipeline: Deliver Faster & ...
Perforce on Tour 2015 - Optimising the Developer Pipeline: Deliver Faster & ...
 
Test driven
Test drivenTest driven
Test driven
 
Testing Testing everywhere
Testing Testing everywhereTesting Testing everywhere
Testing Testing everywhere
 
Vinayak_Sdet_DevOps_Bigdata_5_years
Vinayak_Sdet_DevOps_Bigdata_5_yearsVinayak_Sdet_DevOps_Bigdata_5_years
Vinayak_Sdet_DevOps_Bigdata_5_years
 
One to rule them all
One to rule them allOne to rule them all
One to rule them all
 
Infrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfraInfrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfra
 
Diwakar Nag
Diwakar NagDiwakar Nag
Diwakar Nag
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software Testing
 
How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.
 
Emulators as an Emerging Best Practice for API providers
Emulators as an Emerging Best Practice for API providersEmulators as an Emerging Best Practice for API providers
Emulators as an Emerging Best Practice for API providers
 
NFV Testing
NFV TestingNFV Testing
NFV Testing
 
A tale in automation (Puppet to Ansible)
A tale in automation (Puppet to Ansible)A tale in automation (Puppet to Ansible)
A tale in automation (Puppet to Ansible)
 
ONOS System Test - ONS2016
ONOS System Test - ONS2016ONOS System Test - ONS2016
ONOS System Test - ONS2016
 
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
 
How to implement continuous delivery with enterprise java middleware?
How to implement continuous delivery with enterprise java middleware?How to implement continuous delivery with enterprise java middleware?
How to implement continuous delivery with enterprise java middleware?
 
The_Little_Jenkinsfile_That_Could
The_Little_Jenkinsfile_That_CouldThe_Little_Jenkinsfile_That_Could
The_Little_Jenkinsfile_That_Could
 
Api testing libraries using java script an overview
Api testing libraries using java script   an overviewApi testing libraries using java script   an overview
Api testing libraries using java script an overview
 
Cv fayaz
Cv fayazCv fayaz
Cv fayaz
 

Recently uploaded

Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 

Recently uploaded (20)

Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 

What I Learned From Writing a Test Framework (And Why I May Never Write One Again)

Editor's Notes

  1. Thank you all for coming today and joining in my tech talk! I’d like to try to share some of my experiences about developing test frameworks here at Rackspace so that my mistakes don’t have to be repeated and my insights can be of use to others. One of the challenges about giving this talk was condensing my experiences into a 25 minute presentation, so I’ve had to leave out some of the details and deeper explanations that I would normally dig deeper into. If there’s anything I go over that you’d like more information about, please ask questions!
  2. Before we can talk about test frameworks, I wanted to make sure we have a common understanding of what I mean when I say test framework. So what is a test framework?
  3. Like many terms in software development, it really depends on who you talk to.
  4. When an application developer references test frameworks, they are most likely thinking about something to write unit tests with, while someone who writes black box functional tests may be thinking about end to end scenario tests. It can sound confusing, but all of these different approaches have some similar characteristics in common. These characteristics are what I’ve used to create my personal definition for the phrase
  5. So in my opinion, I purposely called out both development and execution aspects because they are the most commonly provided capabilities that test frameworks provide. A test framework could provide more capabilities, but we’ll talk about the wisdom of that as we go. With that out of the way, we can talk more about some of the trials and tribulations I’ve had with test frameworks during my time at Rackspace.
  6. I’ll share two war stories today, the first of which has to do with a test framework called Zodiac. This story starts about six and a half years back, not very long after I started at Rackspace. My manager at the time called me over to research something for him. I had no idea what I was about to get pulled in to
  7. The conversation went something like “So you've been doing fairly well here...there's this OpenStack thing and we need a test framework for that. I'm going to need you bang out a solution for that.”. Being the go-getter new Racker, I dove right in without asking too many questions. I’ve always liked new challenges, and this project had them in spades. After the initial excitement wore off, I had a sobering moment when I thought through the problems I would need to overcome.
  8. This was a really big ask for me at the time. Before I came to work at Rackspace, most of my test experience was in the realm of web applications. I didn’t know what libraries existed for testing RESTful applications from code. There also weren’t any good examples of testing RESTful APIs (state of the art tooling for API testing at Rackspace was a GUI tool called SOAPUI), so I felt like I was going to have to make things up as I went. On top of the technical challenges, this was during the pre-Public Cloud days when Rackspace was making their major push into OpenStack. Not only was I responsible for meeting the needs of the OpenStack community, but I also needed to meet the testing needs of Compute as we launched it as a product. There was a lot of tension (much of it self-imposed) to get this right. A friend once told me to trust myself but to respect my self-doubt. I was certain that I could come up with a solution that worked, . Thankfully, I was working with a really creative team and we were able to put together a solution that met the initial scope and that we were relatively happy with.
  9. Here’s a high level architecture of the testing solution we came up with. When I’m testing the waters of new languages, I try to keep my solutions as simple as possible. I wanted to build just enough structure without complicating things.
  10. It worked out fairly well! The OpenStack QA team was very happy to see developers focused on testing and embraced the work we had done.
  11. That’s not to say that it didn’t have it’s rough edges. By initially not making a decision about a test runner, we lost the ability to test runner specific decorators. Poor logging hurt because of the stability of OpenStack at the time. It wasn’t always apparent at first whether a test failure was due to an error in the application or in the test framework. Having verbose logs that explained what had happened during each test step by step would’ve gone a long way to making those types of issues much easier to triage. As for Zodiac, it lived on internally for another year as place for Rackspace-specific tests.
  12. The intent was to address the inefficiencies
  13. We created three abstractions: test runners, application drivers, and configuration management. You can have any runner you want as you write a plugin for it. You can use requests and have it auto-serialize your responses. You can validate specific data about a virtual machine without knowing the underlying OS. You can use configuration files and environment variables to configure your tests
  14. In my earlier slides I mentioned that when I started development on Zodiac, I didn’t have any resources to reference about tooling or practices for API testing. The work that I did on Zodiac and OpenCafe may not have solved everyone’s specific issues or have , but it did provide a point of reference for those types of discussions.
  15. Let’s face it: all developers have issues with naming things. In OpenCafe, we had some…special naming issues. To give ourselves credit, we argued for hours just to get to these names! I’m not sure if that’s a complement though….
  16. Too prescriptive: telling people they needed to keep language bindings and tests in separate projects. Also for advocating for test code to be kept separate from application code. While we did end up with a working solution, it’s hard to call it a victory. Confusing conventions and tedious code to handle serialization and deserialization of requests and responses
  17. At the beginning of the year, I spent a lot of time reflecting on how I tried to address testing problems through our frameworks. One of the realizations that I had was that maybe creating testing frameworks, had I really created testing monoliths? I focused so much on making sure that I solved all the problems that everyone had that I didn’t realize that all of those solutions didn’t need to be bundled into one package. Sometimes when you try to build a slick fighter jet, you end up building a giant slapped together castle on chicken feet.
  18. As part of my soul-searching earlier this year, I tried to boil down the foundational components of a testing solution, and this list is what I came up with. Test runner: Parses command line args, sets any runtime configuration, performs test generation and loading Test model: Defines the class structure of the actual tests Assertions: It’s surprising to see how opinionated people can be about how they perform assertions! If you don’t like the assertions that your language or framework provides, there’s a number of custom packages that let you change the format and output of your assertions Handling of test data: This can be as simple as loading data from a text file or as complex as munging together data from environment variables, files, and
  19. In the, we developed all of the components of OpenCafe ourselves due to libraries that met our needs being deficient or nonexistent at the time. However, in the five years since we developed OpenCafe, many of those issues have been resolved. Test runners with parallelization are reliable now, and there is a rapidly growing number of packages that solve very specific problems.
  20. In the, we developed all of the components of OpenCafe ourselves due to libraries that met our needs being deficient or nonexistent at the time. However, in the five years since we developed OpenCafe, many of those issues have been resolved. Test runners with parallelization are reliable now, and there is a rapidly growing number of packages that solve very specific problems.
  21. In the beginning, we developed all of the components of OpenCafe ourselves due to necessary libraries either being deficient or nonexistent at the time. However, in the five years since we developed OpenCafe, many of those issues have been resolved by other open source libraries. Test runners with parallelization are reliable now, and there is a rapidly growing number of packages that solve very specific problems. Rather than rely on one centralized framework to solve all our problems, why not pick components that solve specific problems well instead? Doing so opens test projects up to possibly being less consistent in how they address problems, but also gives teams the freedom to optimize for their specific challenges.
  22. Take a modular approach in your designs. The components you picked today may not be the right solutions at some point in the near future. As one of our leaders in QE says, we reserve the right to get smarter. Try to pick components that do well at solving specific problems so that you are able to swap them out for better solutions if needed. We work in an industry where libraries and even languages of preference can change every three to five years. While languages and libraries may change, good practices live on. I’m sure you hear this enough, but avoid re-inventing the wheel. Hindsight being 20/20, I wish I had contributed to pytest rather than writing my own runner. It would’ve taken longer for me to get the features I needed initially, but I would have also gained all the feature development from that community. I would much rather spend my time solving interesting new problems than maintaining code that I don’t care about. Anything you write you need to maintain, so keep that in mind before you leap.
  23. Can we really design one solution that is flexible enough to solve everyone’s problems?