Test & Code

Brian Okken
undefined
Mar 27, 2020 • 35min

107: Property Based Testing in Python with Hypothesis - Alexander Hultnér

Hypothesis is the Python tool used for property based testing. Hypothesis claims to combine "human understanding of your problem domain with machine intelligence to improve the quality of your testing process while spending less time writing tests."In this episode Alexander Hultnér introduces us to property based testing in Python with Hypothesis.Some topics covered:What is property based testingThinking differently for property based testingUsing hypothesis / property based testing in conjunction with normal testingFailures saved and re-runWhat parts of development/testing is best suited for hypothesis / property based testing Comparing function implementationsTesting against REST APIs that use Open API / Swagger with schemathesis Changing the number of tests in different test environmentsSystem, integration, end to end, and unit testsSpecial Guest: Alexander Hultnér.Links:Hypothesis homeHypothesis docsTest Fast, Fix More - Property based testing with Hypothesis by Alexander Hultnér - YouTubeQuickcheck, Grandfather of property based testingBeyond Unit Tests, Hillel Wayne, PyCon 2018Better Testing With Less Code, Matt Bachmann, PyCon 2016Choosing properties for property-based testing (F#)schemathesis: Hypothesis + Open API / Swagger for testing web applications
undefined
Mar 20, 2020 • 51min

106: Visual Testing : How IDEs can make software testing easier - Paul Everitt

IDEs can help people with automated testing.In this episode, Paul Everitt and Brian discuss ways IDEs can encourage testing and make it easier for everyone, including beginners. We discuss features that exist and are great, as well as what is missing.The conversation also includes topics around being welcoming to new contributors for both open source and professional projects.We talk about a lot of topics, and it's a lot of fun. But it's also important. Because IDEs can make testing Some topics discussed:Making testing more accessibleTest First vs teaching testing lastTDD workflowAutorunRerunning last failuresDifferent ways to run different levels of testsCommand line flags and how to access them in IDEspytest.inizooming in and out of test levelsrunning parametrizationsrunning tests with coverage and profilingparametrize vs parameterizeparametrization identifierspytest fixture supportglobal configurations / configuration templatescoverage and testing and being inviting to new contributorsconfidence in changes and confidence in contributionsnavigating code, tests, fixturesgrouping tests in modules, classes, directoriesBDD, behavior driven development, cucumber, pytest-bddweb development testingparallel testing with xdist and IDE supportrefactor renameSpecial Guest: Paul Everitt.Links:Python Testing with pytest — The pytest bookPyCharmPyCharm proepisode 54: Python 1994 - Paul Everittpytest-xdist
undefined
15 snips
Mar 11, 2020 • 29min

105: TAP: Test Anything Protocol - Matt Layman

The Test Anything Protocol, or TAP, is a way to record test results in a language agnostic way, predates XML by about 10 years, and is still alive and kicking.Matt Layman has contributed to Python in many ways, including his educational newsletter, and his Django podcast, Django Riffs.Matt is also the maintainer of tap.py and pytest-tap, two tools that bring the Test Anything Protocol to Python.In this episode, Matt and I discuss TAP, it's history, his involvement, and some cool use cases for it.Special Guest: Matt Layman.Links:mattlayman.comDjango Riffs, a podcast for learning Django · Matt LaymanTest Anything Protocolpytest-tap: Test Anything Protocol (TAP) reporting plugin for pytesttappy - TAP tools for Python 
undefined
Mar 4, 2020 • 45min

104: Top 28 pytest plugins - Anthony Sottile

pytest is awesome by itself. pytest + plugins is even better. In this episode, Anthony Sottile and Brian Okken discuss the top 28 pytest plugins.Some of the plugins discussed (we also mention a few plugins related to some on this list): pytest-cov pytest-timeout pytest-xdist pytest-mock pytest-runner pytest-instafail pytest-django pytest-html pytest-metadatapytest-asynciopytest-split-testspytest-sugarpytest-rerunfailurespytest-envpytest-cachepytest-flaskpytest-benchmarkpytest-orderingpytest-watchpytest-pythonpathpytest-flake8pytest-pep8pytest-repeatpytest-pylintpytest-randomlypytest-seleniumpytest-mypypytest-freezegunHonorable mention:pytest-blackpytest-emojipytest-pooSpecial Guest: Anthony Sottile.Links:PyPI Download StatsTop PyPI Packages: A monthly dump of the 4,000 most-downloaded packages from PyPITest & Code 25: Selenium, pytest, Mozilla – Dave Huntpre-commit
undefined
Mar 1, 2020 • 27min

103: Django - Lacey Williams Henschel

Django is without a doubt one of the most used web frameworks for Python. Lacey Williams Henschel is a Django consultant and has joined me to talk about Django, the Django community, and so much more.Topics:DjangoThe Django CommunityDjango GirlsDjango Girls TutorialDjangoConSoftware TestingUsing tests during learningpytest-djangotesting DjangoWagtailSpecial Guest: Lacey Williams Henschel.Links:Django Django Girls Django Girls TutorialDjangoCon US 2020 Django: Under the HoodPyDataPyCascadesDjango REST frameworkpytest-djangoWagtail CMS - Django Content Management System
undefined
Feb 27, 2020 • 42min

102: Cosmic Python, TDD, testing and external dependencies - Harry Percival

Harry Percival has completed his second book, "Architecture Patterns with Python". So of course we talk about the book, also known as "Cosmic Python". We also discuss lots of testing topics, especially related to larger systems and systems involving third party interfaces and APIs.Topics Harry's new book, "Architecture Patterns with Python". a.k.a. Cosmic Python TDD : Test Driven DevelopmentTest PyramidTradeoffs of different architectural choicesMocks and their pitfallsAvoiding mocksSeparating conceptual business logicDependency injectionDependency inversionIdentifying external dependenciesInterface adapters to mimize the exposed surface area of external dependenciesLondon School vs Classic/Detroit School of TDDTesting strategies for testing external REST APIsLinks:Cosmic Python - Simple Patterns for Building Complex ApplicationsArchitecture Patterns with Python - on AmazonHarry Percival (@hjwp) / TwitterBob Gregory (@bob_the_mighty) / Twittervcrpy · PyPIWriting tests for external API callsStop Using Mocks (for a while) - Harry's PyCon talk
undefined
Feb 19, 2020 • 45min

101: Application Security - Anthony Shaw

Application security is best designed into a system from the start. Anthony Shaw is doing something about it by creating an editor plugin that actually helps you write more secure application code while you are coding.On today's Test & Code, Anthony and I discuss his security plugin, but also application security in general, as well as other security components you need to consider.Security is something every team needs to think about, whether you are a single person team, a small startup, or a large corporation.Anthony and I also discuss where to start if it's just a few of you, or even just one of you.Topics include:Finding security risks while writing code.What are the risks for your applications.Thinking about attack surfaces.Static and dynamic code analysis.Securing the environment an app is running in.Tools for scanning live sites for vulnerabilities.Secret management.Hashing algorithms.Authentication systems.and Anthony's upcoming cPython Internals book.Special Guest: Anthony Shaw.Links:Python Security - plugin for PyCharmBanditHack The Box 
undefined
Feb 13, 2020 • 36min

100: A/B Testing - Leemay Nassery

Let's say you have a web application and you want to make some changes to improve it. You may want to A/B test it first to make sure you are really improving things.But really what is A/B testing? That's what we'll find out on this episode with Leemay Nassery.Special Guest: Leemay Nassery.
undefined
Jan 30, 2020 • 15min

99: Software Maintenance and Chess

I play a form of group chess that has some interesting analogies to software development and maintenance of existing systems. This episode explains group chess and explores a few of those analogies.
undefined
Jan 21, 2020 • 33min

98: pytest-testmon - selects tests affected by changed files and methods - Tibor Arpas

pytest-testmon is a pytest plugin which selects and executes only tests you need to run. It does this by collecting dependencies between tests and all executed code (internally using Coverage.py) and comparing the dependencies against changes. testmon updates its database on each test execution, so it works independently of version control.In this episode, I talk with testmon creator Tibor Arpas about testmon, about it's use and how it works.Special Guest: Tibor Arpas.Links:testmon.orgDetermining affected testsTibor's post on using pytest in PyCharmruntime-info plugin for PyCharm

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app