SlideShare a Scribd company logo
1 of 31
Jeff Rouse, Director of Product Management, ActiveState
Tom Radcliffe, Director of Engineering, ActiveState
Test Driven Development with
ActivePython
#APY2017
Today’s Speakers
Jeff Rouse
Director of Product Management
ActiveState
Tom Radcliffe
Director of Engineering
ActiveState
#APY2017
Agenda
> What is Test Driven Development (TDD)?
> How to successfully implement TDD
> Why is ActivePython well suited to TDD?
> How can enterprises benefit from TDD?
> Q/A
#APY2017
What is TDD?
#APY2017
Tests Before Code
> Don’t write a line of new code unless you first
have a failing automated test
> Eliminate duplication
Red: test fails
Green: test passes but code is a mess
Refactor: clean up that mess!
#APY2017
TTD Workflow
> Requirements [What]
> Specifications [How]
> “Design:”
> Automated test for a specification
> Code to pass
> Refactor
> Iterate
=> Small steps, organic design
#APY2017
“Eliminate Duplication”
Every piece of information in an application
should be represented exactly once.
#APY2017
Pros of TDD
#APY2017
> Brings dev closer to the user
> Requirement questions found faster
> Makes you trust your code
> Make changes with confidence
> Fix bugs once
> Easier to handle errors/bugs initially
> Reduces bugs throughout the system
Cons of TDD
> Larger code base
> Stiffness (harder to change)
> Test maintenance takes time
> Easy to go too far (100% code coverage?!)
> Mocks, dependency injection, complexity…
> Not a replacement for integration tests
#APY2017
More TDD Goodness
> Know the finish line!
> Increases team ownership - trust!
> Tests supplement the docs
> Makes onboarding new devs easier
> Greater confidence in changes allows a quicker
release cadence (CD!)
> More time spent delivering value
#APY2017
> Test Driven Development
was the most popular
methodology in our 2016
Open Source Languages
Survey
> 867 respondents
> 49% using TDD
#APY2017
How to successfully
implement TDD
#APY2017
Attitude + Automation
> Must have committed attitude
> Integrate testing with routine workflow
> Automate everything
> Metaprogramming
“Virtue is not an act, it is a habit”
-- Aristotle on software
development best practices
#APY2017
Things to Look Out For
> Embedded assumptions
> Overly narrow/concrete tests
> Needs of testing taking over design
> Layered algorithms vs inversion of control
> Sometimes the only way to understand the
problem is to write the code
#APY2017
ActivePython & TDD
> Careful with those types!
> Strong language support for tests
> Active communities around several testing
packages supporting a variety of testing needs
& goals
#APY2017
Unittest
> Part of Python standard library since Python 2.1
> Still under active development
#APY2017
Pytest
> Most full featured and popular of third party
packages
> Can run unittest and nose tests
> Our recommended testing package
> Great support for fixtures
> Plugins for other frameworks (ex. Django,
Twisted, Pyflakes)
#APY2017
Pyflakes
> Code quality checks w/ your testing
> Analyzes your source for errors
> Low false positive rate
> Does not check for style
> Good speed
> Can run from pytest
#APY2017
Coverage
> Monitors test execution in real time
> Combined with tests tells you what code is
never tested
#APY2017
Other Testing Packages
> nose/nose2: test-runner
> pyresttest: testing REST APIs
> selenium: Web browser testing
> doctest: std. library, tests via code comments
#APY2017
Future of TDD
> Metaprogramming
> Improved language support
> Functional programming
> More automation/intelligence
#APY2017
ActivePoll:
Do you currently or plan to employ
TDD using Python?
#APY2017
Why is ActivePython well
suited to TDD?
#APY2017
Included Testing Modules
> Pytest
> Coverage
> Pyflakes
(+Unittest)
Plus many of the most popular Python developer
packages.
#APY2017
Enterprise ActivePython Benefits
> More reliable delivery
> Integrated OpenSSL +updates
> More maintainable code
> Commercial support/SLAs
> Compliance, indemnification
> Custom packages
> Language upgrades!
#APY2017
Developer ActivePython Benefits
> Turn-key installation
> Cross-platform support
> Extra “batteries included”
> All major language versions
> All major platforms
> Code recipes
> Thorough documentation
#APY2017
ActivePython Custom Packages
Promo!
Purchase ActivePython Enterprise Edition in February
2017 and receive custom packages for free.
Email us for more details
solutions@activestate.com
ActiveState News
> ActivePython 2.7.13 & 3.5.2 released
> Komodo IDE + ActivePython...together at last!
> Another ActivePython release later in Q1!
> ActiveGo - also this quarter
> ActiveRuby - releasing Q2
> ActiveNode & ActiveLua arriving later in 2017
#APY2017
Upcoming Events
> Pycon 2017 - May 17-25 in Portland, OR
> OSCON 2017 - May 8-11 in Austin, TX
> Look for another ActivePython webinar in Q2
New Language Distributions
> Sign up for more
information:
> www.activestate.com/Ruby
> www.activestate.com/Go
> www.activestate.com/Node
> www.activestate.com/Lua
#APY2017
Q/A
Download ActivePython!
activestate.com/activepython/downloads
Contact us if you have questions:
jeffr@activestate.com
support@activestate.com
sales@activestate.com
#APY2017

More Related Content

More from ActiveState

The ActiveState of Tcl
The ActiveState of TclThe ActiveState of Tcl
The ActiveState of TclActiveState
 
PERL SURVEY 2016
PERL SURVEY 2016PERL SURVEY 2016
PERL SURVEY 2016ActiveState
 
Improving Customer Experience Using ActivePerl and ActivePython
Improving Customer Experience Using ActivePerl and ActivePythonImproving Customer Experience Using ActivePerl and ActivePython
Improving Customer Experience Using ActivePerl and ActivePythonActiveState
 
Python: The Programmer's Lingua Franca
Python: The Programmer's Lingua FrancaPython: The Programmer's Lingua Franca
Python: The Programmer's Lingua FrancaActiveState
 
Continuing Evolution of Perl: Highlights of ActivePerl 5.14
Continuing Evolution of Perl: Highlights of ActivePerl 5.14Continuing Evolution of Perl: Highlights of ActivePerl 5.14
Continuing Evolution of Perl: Highlights of ActivePerl 5.14ActiveState
 
Looking Ahead to Tcl 8.6
Looking Ahead to Tcl 8.6Looking Ahead to Tcl 8.6
Looking Ahead to Tcl 8.6ActiveState
 
Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to pythonActiveState
 
US SEC Mandates, Python, and Financial Modeling
US SEC Mandates, Python, and Financial ModelingUS SEC Mandates, Python, and Financial Modeling
US SEC Mandates, Python, and Financial ModelingActiveState
 
ActiveState, CA, Taking quality products to market faster with enterprise rea...
ActiveState, CA, Taking quality products to market faster with enterprise rea...ActiveState, CA, Taking quality products to market faster with enterprise rea...
ActiveState, CA, Taking quality products to market faster with enterprise rea...ActiveState
 
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12ActiveState
 
Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...
Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...
Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...ActiveState
 
Best Practices in Porting & Developing Enterprise Applications to the Cloud u...
Best Practices in Porting & Developing Enterprise Applications to the Cloud u...Best Practices in Porting & Developing Enterprise Applications to the Cloud u...
Best Practices in Porting & Developing Enterprise Applications to the Cloud u...ActiveState
 
Safeguarding Against the Risks of Improper Open Source Licensing - Valuable...
Safeguarding Against the Risks of Improper Open Source Licensing - Valuable...Safeguarding Against the Risks of Improper Open Source Licensing - Valuable...
Safeguarding Against the Risks of Improper Open Source Licensing - Valuable...ActiveState
 
Take Quality Products to Market Faster with Enterprise-Ready Dynamic Languages
Take Quality Products to Market Faster with Enterprise-Ready Dynamic LanguagesTake Quality Products to Market Faster with Enterprise-Ready Dynamic Languages
Take Quality Products to Market Faster with Enterprise-Ready Dynamic LanguagesActiveState
 
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...ActiveState
 
Is Outsourcing the Answer in an Economic Downturn? Outsourcing Support for Op...
Is Outsourcing the Answer in an Economic Downturn? Outsourcing Support for Op...Is Outsourcing the Answer in an Economic Downturn? Outsourcing Support for Op...
Is Outsourcing the Answer in an Economic Downturn? Outsourcing Support for Op...ActiveState
 
License to Code: Indemnifying Your Business Against Open Source Licensing Lia...
License to Code: Indemnifying Your Business Against Open Source Licensing Lia...License to Code: Indemnifying Your Business Against Open Source Licensing Lia...
License to Code: Indemnifying Your Business Against Open Source Licensing Lia...ActiveState
 
Unveiling the Origins, Myths, Use and Benefits of Dynamic Languages
Unveiling the Origins, Myths, Use and Benefits of Dynamic LanguagesUnveiling the Origins, Myths, Use and Benefits of Dynamic Languages
Unveiling the Origins, Myths, Use and Benefits of Dynamic LanguagesActiveState
 

More from ActiveState (18)

The ActiveState of Tcl
The ActiveState of TclThe ActiveState of Tcl
The ActiveState of Tcl
 
PERL SURVEY 2016
PERL SURVEY 2016PERL SURVEY 2016
PERL SURVEY 2016
 
Improving Customer Experience Using ActivePerl and ActivePython
Improving Customer Experience Using ActivePerl and ActivePythonImproving Customer Experience Using ActivePerl and ActivePython
Improving Customer Experience Using ActivePerl and ActivePython
 
Python: The Programmer's Lingua Franca
Python: The Programmer's Lingua FrancaPython: The Programmer's Lingua Franca
Python: The Programmer's Lingua Franca
 
Continuing Evolution of Perl: Highlights of ActivePerl 5.14
Continuing Evolution of Perl: Highlights of ActivePerl 5.14Continuing Evolution of Perl: Highlights of ActivePerl 5.14
Continuing Evolution of Perl: Highlights of ActivePerl 5.14
 
Looking Ahead to Tcl 8.6
Looking Ahead to Tcl 8.6Looking Ahead to Tcl 8.6
Looking Ahead to Tcl 8.6
 
Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to python
 
US SEC Mandates, Python, and Financial Modeling
US SEC Mandates, Python, and Financial ModelingUS SEC Mandates, Python, and Financial Modeling
US SEC Mandates, Python, and Financial Modeling
 
ActiveState, CA, Taking quality products to market faster with enterprise rea...
ActiveState, CA, Taking quality products to market faster with enterprise rea...ActiveState, CA, Taking quality products to market faster with enterprise rea...
ActiveState, CA, Taking quality products to market faster with enterprise rea...
 
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
 
Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...
Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...
Python & Finance: US Government Mandates, Financial Modeling, and Other Snake...
 
Best Practices in Porting & Developing Enterprise Applications to the Cloud u...
Best Practices in Porting & Developing Enterprise Applications to the Cloud u...Best Practices in Porting & Developing Enterprise Applications to the Cloud u...
Best Practices in Porting & Developing Enterprise Applications to the Cloud u...
 
Safeguarding Against the Risks of Improper Open Source Licensing - Valuable...
Safeguarding Against the Risks of Improper Open Source Licensing - Valuable...Safeguarding Against the Risks of Improper Open Source Licensing - Valuable...
Safeguarding Against the Risks of Improper Open Source Licensing - Valuable...
 
Take Quality Products to Market Faster with Enterprise-Ready Dynamic Languages
Take Quality Products to Market Faster with Enterprise-Ready Dynamic LanguagesTake Quality Products to Market Faster with Enterprise-Ready Dynamic Languages
Take Quality Products to Market Faster with Enterprise-Ready Dynamic Languages
 
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...
The True Cost of Open Source Software: Uncovering Hidden Costs and Maximizing...
 
Is Outsourcing the Answer in an Economic Downturn? Outsourcing Support for Op...
Is Outsourcing the Answer in an Economic Downturn? Outsourcing Support for Op...Is Outsourcing the Answer in an Economic Downturn? Outsourcing Support for Op...
Is Outsourcing the Answer in an Economic Downturn? Outsourcing Support for Op...
 
License to Code: Indemnifying Your Business Against Open Source Licensing Lia...
License to Code: Indemnifying Your Business Against Open Source Licensing Lia...License to Code: Indemnifying Your Business Against Open Source Licensing Lia...
License to Code: Indemnifying Your Business Against Open Source Licensing Lia...
 
Unveiling the Origins, Myths, Use and Benefits of Dynamic Languages
Unveiling the Origins, Myths, Use and Benefits of Dynamic LanguagesUnveiling the Origins, Myths, Use and Benefits of Dynamic Languages
Unveiling the Origins, Myths, Use and Benefits of Dynamic Languages
 

Recently uploaded

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Recently uploaded (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Test Driven Development with ActivePython

  • 1. Jeff Rouse, Director of Product Management, ActiveState Tom Radcliffe, Director of Engineering, ActiveState Test Driven Development with ActivePython #APY2017
  • 2. Today’s Speakers Jeff Rouse Director of Product Management ActiveState Tom Radcliffe Director of Engineering ActiveState #APY2017
  • 3. Agenda > What is Test Driven Development (TDD)? > How to successfully implement TDD > Why is ActivePython well suited to TDD? > How can enterprises benefit from TDD? > Q/A #APY2017
  • 5. Tests Before Code > Don’t write a line of new code unless you first have a failing automated test > Eliminate duplication Red: test fails Green: test passes but code is a mess Refactor: clean up that mess! #APY2017
  • 6. TTD Workflow > Requirements [What] > Specifications [How] > “Design:” > Automated test for a specification > Code to pass > Refactor > Iterate => Small steps, organic design #APY2017
  • 7. “Eliminate Duplication” Every piece of information in an application should be represented exactly once. #APY2017
  • 8. Pros of TDD #APY2017 > Brings dev closer to the user > Requirement questions found faster > Makes you trust your code > Make changes with confidence > Fix bugs once > Easier to handle errors/bugs initially > Reduces bugs throughout the system
  • 9. Cons of TDD > Larger code base > Stiffness (harder to change) > Test maintenance takes time > Easy to go too far (100% code coverage?!) > Mocks, dependency injection, complexity… > Not a replacement for integration tests #APY2017
  • 10. More TDD Goodness > Know the finish line! > Increases team ownership - trust! > Tests supplement the docs > Makes onboarding new devs easier > Greater confidence in changes allows a quicker release cadence (CD!) > More time spent delivering value #APY2017
  • 11. > Test Driven Development was the most popular methodology in our 2016 Open Source Languages Survey > 867 respondents > 49% using TDD #APY2017
  • 13. Attitude + Automation > Must have committed attitude > Integrate testing with routine workflow > Automate everything > Metaprogramming “Virtue is not an act, it is a habit” -- Aristotle on software development best practices #APY2017
  • 14. Things to Look Out For > Embedded assumptions > Overly narrow/concrete tests > Needs of testing taking over design > Layered algorithms vs inversion of control > Sometimes the only way to understand the problem is to write the code #APY2017
  • 15. ActivePython & TDD > Careful with those types! > Strong language support for tests > Active communities around several testing packages supporting a variety of testing needs & goals #APY2017
  • 16. Unittest > Part of Python standard library since Python 2.1 > Still under active development #APY2017
  • 17. Pytest > Most full featured and popular of third party packages > Can run unittest and nose tests > Our recommended testing package > Great support for fixtures > Plugins for other frameworks (ex. Django, Twisted, Pyflakes) #APY2017
  • 18. Pyflakes > Code quality checks w/ your testing > Analyzes your source for errors > Low false positive rate > Does not check for style > Good speed > Can run from pytest #APY2017
  • 19. Coverage > Monitors test execution in real time > Combined with tests tells you what code is never tested #APY2017
  • 20. Other Testing Packages > nose/nose2: test-runner > pyresttest: testing REST APIs > selenium: Web browser testing > doctest: std. library, tests via code comments #APY2017
  • 21. Future of TDD > Metaprogramming > Improved language support > Functional programming > More automation/intelligence #APY2017
  • 22. ActivePoll: Do you currently or plan to employ TDD using Python? #APY2017
  • 23. Why is ActivePython well suited to TDD? #APY2017
  • 24. Included Testing Modules > Pytest > Coverage > Pyflakes (+Unittest) Plus many of the most popular Python developer packages. #APY2017
  • 25. Enterprise ActivePython Benefits > More reliable delivery > Integrated OpenSSL +updates > More maintainable code > Commercial support/SLAs > Compliance, indemnification > Custom packages > Language upgrades! #APY2017
  • 26. Developer ActivePython Benefits > Turn-key installation > Cross-platform support > Extra “batteries included” > All major language versions > All major platforms > Code recipes > Thorough documentation #APY2017
  • 27. ActivePython Custom Packages Promo! Purchase ActivePython Enterprise Edition in February 2017 and receive custom packages for free. Email us for more details solutions@activestate.com
  • 28. ActiveState News > ActivePython 2.7.13 & 3.5.2 released > Komodo IDE + ActivePython...together at last! > Another ActivePython release later in Q1! > ActiveGo - also this quarter > ActiveRuby - releasing Q2 > ActiveNode & ActiveLua arriving later in 2017 #APY2017
  • 29. Upcoming Events > Pycon 2017 - May 17-25 in Portland, OR > OSCON 2017 - May 8-11 in Austin, TX > Look for another ActivePython webinar in Q2
  • 30. New Language Distributions > Sign up for more information: > www.activestate.com/Ruby > www.activestate.com/Go > www.activestate.com/Node > www.activestate.com/Lua #APY2017
  • 31. Q/A Download ActivePython! activestate.com/activepython/downloads Contact us if you have questions: jeffr@activestate.com support@activestate.com sales@activestate.com #APY2017