129: How to Test Anything - David Lord
Test & Code7 Syys 2020

129: How to Test Anything - David Lord

I asked people on twitter to fill in "How do I test _____?" to find out what people want to know how to test.
Lots of responses. David Lord agreed to answer them with me.
In the process, we come up with lots of great general advice on how to test just about anything.

Specific Questions people asked:

  • What makes a good test?
  • How do you test web app performance?
  • How do you test cookie cutter templates?
  • How do I test my test framework?
  • How do I test permission management?
  • How do I test SQLAlchemy models and pydantic schemas in a FastAPI app?
  • How do I test warehouse ETL code?
  • How do I test and mock GPIO pins on hardware for code running MicroPython on a device?
  • How do I test PyQt apps?
  • How do I test web scrapers?
  • Is it the best practice to put static html in your test directory or just snippets stored in string variables?
  • What's the best way to to test server client API contracts?
  • How do I test a monitoring tool?

We also talk about:

  • What is the Flask testing philosophy?
  • What do Flask tests look like?
  • Flask and Pallets using pytest
  • Code coverage

Some of the resulting testing strategies:

  • Set up some preconditions. Run the function. Get the result.
  • Don't test external services.
  • Do test external service failures.
  • Don't test the frameworks you are using.
  • Do test your use of a framework.
  • Use open source projects to learn how something similar to your project tests things.
  • Focus on your code.
  • Focus on testing your new code.
  • Try to architect your application such that actual GUI testing is minimal.
  • Split up a large problem into smaller parts that are easier to test.
  • Nail down as many parts as you can.

Special Guest: David Lord.





Tämä jakso on lisätty Podme-palveluun avoimen RSS-syötteen kautta eikä se ole Podmen omaa tuotantoa. Siksi jakso saattaa sisältää mainontaa.

Jaksot(237)

238: So Long, and Thanks for All the Fish

238: So Long, and Thanks for All the Fish

A farewell to a fun 10 years.Also, I should have tested it better. :)In the audio I got the numbers wrong.  Doh!This is episode 238, not 237. Oh well.I'll still be around, of course, at:pythontest.com...

15 Elo 20252min

237: FastAPI Cloud - Sebastián Ramírez

237: FastAPI Cloud - Sebastián Ramírez

In this episode, Brian interviews Sebastián Ramírez, creator of FastAPI, about its rapid rise in developer popularity and the launch of FastAPI Cloud. Sebastian explains how FastAPI Cloud addresses de...

11 Elo 202536min

236: Git Tips for Testing - Adam Johnson

236: Git Tips for Testing - Adam Johnson

In this episode, host Brian Okken and guest Adam Johnson explore essential Git features, highlighted by Adam's updated book, "Boost Your Git DX." Key topics include "cherry picking" for selective comm...

30 Heinä 202519min

235: pytest-django - Adam Johnson

235: pytest-django - Adam Johnson

In this episode, special guest Adam Johnson joins the show and examines pytest-django, a popular plugin among Django developers. He highlights its advantages over the built-in unittest framework, incl...

22 Heinä 202519min

234: pytest-metadata - provides access to test session metadata

234: pytest-metadata - provides access to test session metadata

pytest-metadata is described as a plugin for pytest that provides access to test session metadata. That is such a humble description for such a massively useful plugin. If you're already using pytest-...

8 Touko 20256min

233: pytest-check - allow multiple failures per test

233: pytest-check - allow multiple failures per test

pytest-check is a pytest plugin that allows multiple failures per test.Normally, a test function will fail and stop running with the first failed assert. That's totally fine for tons of kinds of softw...

2 Touko 20258min

232: The role of AI in software testing - Anthony Shaw

232: The role of AI in software testing - Anthony Shaw

AI is helping people write code.  Tests are one of those things that some people don't like to write.   Can AI play a role in creating automated software tests?  Well, yes. But it's a nuanced yes.  An...

25 Huhti 202556min

231: pytest-repeat - works fine on Python 3.14

231: pytest-repeat - works fine on Python 3.14

pytest-repeat is a pytest plugin that makes it easy to repeat a single test, or multiple tests, a specific number of times.  works fine on Python 3.14is tested on Python 3.9-3.14probably works fine st...

10 Huhti 20257min

Suosittua kategoriassa Koulutus

rss-murhan-anatomia
psykopodiaa-podcast
voi-hyvin-meditaatiot-2
rss-vapaudu-voimaasi
kesken
rss-niinku-asia-on
rss-arkea-ja-aurinkoa-podcast-espanjasta
rss-liian-kuuma-peruna
rss-laadukasta-ensihoitoa
adhd-podi
aamukahvilla
rss-luonnollinen-synnytys-podcast
solu-ja-molekyylibiologian-perusteet
psykologia
jari-sarasvuo-podcast
rahapuhetta
ihminen-tavattavissa-tommy-hellsten-instituutti
rss-narsisti
rss-duodecim-lehti
dreamtalk