DiscoverTest & Code : Python Testing for Software Engineers
Test & Code :  Python Testing for Software Engineers
Claim Ownership

Test & Code : Python Testing for Software Engineers

Author: Brian Okken

Subscribed: 3,169Played: 38,335
Share

Description

Test & Code is a weekly podcast hosted by Brian Okken.
The show covers a wide array of topics including software engineering, development, testing, Python programming, and many related topics.
When we get into the implementation specifics, that's usually Python, such as Python packaging, tox, pytest, and unittest. However, well over half of the topics are language agnostic, such as data science, DevOps, TDD, public speaking, mentoring, feature testing, NoSQL databases, end to end testing, automation, continuous integration, development methods, Selenium, the testing pyramid, and DevOps.
114 Episodes
Reverse
"The mission of the Python Software Foundation is to promote, protect, and advance the Python programming language, and to support and facilitate the growth of a diverse and international community of Python programmers." That's a lot of responsibility, and to that end, the PSF Board Directors help out quite a bit. If you want to be a part of the board, you can. There's an election coming up right around the corner and you gotta get your nomination in by May 31. You can also join the PSF if you want to vote for who gets to be part of the board. But what does it really mean to be on the Board, and what are some of the things the PSF does? To help answer those questions, I've got Ewa Jodlowska, the PSF Executive Director, and Christopher Neugebauer, a current board member, on the show today. I've also got some great links in the show notes if we don't answer your questions and you want to find out more. Special Guests: Christopher Neugebauer and Ewa Jodlowska.
Technical debt has to be dealt with on a regular basis to have a healthy product and development team. The impacts of technical debt include emotional drain on engineers and slowing down development and can adversely affect your hiring ability and retention. But really, what is technical debt? Can we measure it? How do we reduce it, and when? James Smith, the CEO of Bugsnag, joins the show to talk about technical debt and all of these questions. Special Guest: James Smith.
"Code is read much more often than it is written." - Guido van Rossum This is true for both production code and test code. When you are trying to understand why a test is failing, you'll be very grateful to the test author if they've taken the care to make it readable. David Seddon came up with 6 principles to help us write more readable tests. We discuss these, as well as more benefits of readable tests. David's 6 Principles of Readable Tests: Profit from the work of others Put naming to work Show only what matters Don’t repeat yourself Arrange, act, assert Aim high Special Guest: David Seddon.
In both unittest and pytest, when a test function hits a failing assert, the test stops and is marked as a failed test. What if you want to keep going, and check more things? There are a few ways. One of them is subtests. Python's unittest introduced subtests in Python 3.4. pytest introduced support for subtests with changes in pytest 4.4 and a plugin, called pytest-subtests. Subtests are still not really used that much. But really, what are they? When could you use them? And more importantly, what should you watch out for if you decide to use them? That's what Paul Ganssle and I will be talking about today. Special Guest: Paul Ganssle.
Django supports testing out of the box with some cool extensions to unittest. However, many people are using pytest for their Django testing, mostly using the pytest-django plugin. Adam Parkin, who is known online as CodependentCodr (https://twitter.com/codependentcodr), joins us to talk about migrating an existing Django project from unittest to pytest. Adam tells us just how easy this is. Special Guest: Adam Parkin.
Financial services have their own unique testing development challenges. But they also have lots of the same challenges as many other software projects. Eric Bergemann joins Brian Okken to discuss: Specific testing challenges in the financial services domain CI/CD : Continuous Integration, Continuous Deployment TDD : Test Driven Development Confidence from testable applications Testing strategies to add coverage to legacy systems Testing the data and test cases themselves DevOps Continuous testing Manual testing procedures BDD & Gherkin Hiring in vs training industry knowledge Special Guest: Eric Bergemann.
Apache Spark is a unified analytics engine for large-scale data processing. PySpark blends the powerful Spark big data processing engine with the Python programming language to provide a data analysis platform that can scale up for nearly any task. Johnathan Rioux, author of "PySpark in Action", joins the show and gives us a great introduction of Spark and PySpark to help us decide how to get started and decide whether or not to decide if Spark and PySpark are right you. Special Guest: Jonathan Rioux.
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 testing Thinking differently for property based testing Using hypothesis / property based testing in conjunction with normal testing Failures saved and re-run What parts of development/testing is best suited for hypothesis / property based testing Comparing function implementations Testing against REST APIs that use Open API / Swagger with schemathesis Changing the number of tests in different test environments System, integration, end to end, and unit tests Special Guest: Alexander Hultnér.
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 accessible Test First vs teaching testing last TDD workflow Autorun Rerunning last failures Different ways to run different levels of tests Command line flags and how to access them in IDEs pytest.ini zooming in and out of test levels running parametrizations running tests with coverage and profiling parametrize vs parameterize parametrization identifiers pytest fixture support global configurations / configuration templates coverage and testing and being inviting to new contributors confidence in changes and confidence in contributions navigating code, tests, fixtures grouping tests in modules, classes, directories BDD, behavior driven development, cucumber, pytest-bdd web development testing parallel testing with xdist and IDE support refactor rename Special Guest: Paul Everitt.
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.
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-metadata pytest-asyncio pytest-split-tests pytest-sugar pytest-rerunfailures pytest-env pytest-cache pytest-flask pytest-benchmark pytest-ordering pytest-watch pytest-pythonpath pytest-flake8 pytest-pep8 pytest-repeat pytest-pylint pytest-randomly pytest-selenium pytest-mypy pytest-freezegun Honorable mention: - pytest-black - pytest-emoji - pytest-poo Special Guest: Anthony Sottile.
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: * Django * The Django Community * Django Girls * Django Girls Tutorial * DjangoCon * Software Testing * Using tests during learning * pytest-django * testing Django * Wagtail Special Guest: Lacey Williams Henschel.
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 Development Test Pyramid Tradeoffs of different architectural choices Mocks and their pitfalls Avoiding mocks Separating conceptual business logic Dependency injection Dependency inversion Identifying external dependencies Interface adapters to mimize the exposed surface area of external dependencies London School vs Classic/Detroit School of TDD Testing strategies for testing external REST APIs Special Guest: Harry Percival.
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.
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.
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.
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.
This episode is not just a look back on 2019, and a look forward to 2020. Also, 2019 is the end of an amazingly transofrmative decade for me, so I'm going to discuss that as well. top 10 episodes of 2019 10: episode 46 (https://testandcode.com/46), Testing Hard To Test Applications - Anthony Shaw 9: episode 64 (https://testandcode.com/64), Practicing Programming to increase your value 8: episode 70 (https://testandcode.com/70), Learning Software without a CS degree - Dane Hillard 7: episode 75 (https://testandcode.com/75), Modern Testing Principles - Alan Page 6: episode 72 (https://testandcode.com/72), Technical Interview Fixes - April Wensel 5: episode 69 (https://testandcode.com/69), Andy Hunt - The Pragmatic Programmer 4: episode 73 (https://testandcode.com/73), PyCon 2019 Live Recording 3: episode 71 (https://testandcode.com/71), Memorable Tech Talks, The Ultimate Guide - Nina Zakharenko 2: episode 76 (https://testandcode.com/76), TDD: Don’t be afraid of Test-Driven Development - Chris May 1: episode 89 (https://testandcode.com/89), Improving Programming Education - Nicholas Tollervey Looking back on the last decade Some amazing events, like 2 podcasts, a book, a blog, speaking events, and teaching has led me to where we're at now. Looking forward to 2020 and beyond I discussed what's in store in the next year and moving forward. A closing quote Software is a blast. At least, it should be. I want everyone to have fun writing software. Leaning on automated tests is the best way I know to allow me confidence and freedome to: - rewrite big chunks of code - play with the code - try new things - have fun without fear - go home feeling good about what I did - be proud of my code I want everyone to have that. That's why I promote and teach automated testing. I hope you had an amazing decade. And I wish you a productive and fun 2020 and the upcoming decade. If we work together and help eachother reach new heights, we can achieve some pretty amazing things
Pipelines are used a lot in software projects to automated much of the work around build, test, deployment and more. Thomas Eckert talks with me about pipelines, specifically Azure Pipelines. Some of the history, and how we can use pipelines for modern Python projects. Special Guest: Thomas Eckert.
Data science and machine learning are affecting more of our lives every day. Decisions based on data science and machine learning are heavily dependent on the quality of the data, and the quality of the data pipeline. Some of the software in the pipeline can be tested to some extent with traditional testing tools, like pytest. But what about the data? The data entering the pipeline, and at various stages along the pipeline, should be validated. That's where pipeline tests come in. Pipeline tests are applied to data. Pipeline tests help you guard against upstream data changes and monitor data quality. Abe Gong and Superconductive are building an open source project called Great Expectations. It's a tool to help you build pipeline tests. This is quite an interesting idea, and I hope it gains traction and takes off. Special Guest: Abe Gong.
loading
Comments (6)

Max Ong Zong Bao

I would be interested to invite you as keynote for PyCon Singapore in June and I would love to know more on your PyTest online courses when it releases.

Jan 3rd
Reply

Александр Михеев

Such a great episode! I've even listened to it twice

Dec 9th
Reply

Eduardo Costa

I enjoyed this episode. Hope more episodes on this subject.

Mar 15th
Reply

Leora Juster

react tables

Jan 12th
Reply

GreatBahram

another great episode

Dec 16th
Reply

Antonio Andrade

Thanks for sharing these good tips

Dec 9th
Reply
Download from Google Play
Download from App Store