
Episode 165 · Season 4
165 - Flaky Tests
About this episode
Changelog
- I’ve sorted the Kubernetes ingress controller for the staging deployment of howtocodewell.net
- I’ve got a few problems with connecting services outside of the Kubernetes cluster but I am working my way through those.
- I’ve been updating the pipelines to allow for certain manual jobs in GitLab.
News/articles
Python ASGI The future of Python Web Development
A new asynchronous standard for Python web applications.
WSGI = Web Server Gateway Interface
ASGI = Asynchronous Server Gateway Interface
https://www.infoworld.com/article/3658336/asgi-explained-the-future-of-python-web-development.html
Podcast 2.0
I have my eye on the podcast 2.0 movement and may start to add some backlog tickets to investigate what is involved from a technical standpoint to updating the RSS feeds.
https://medium.com/@everywheretrip/an-introduction-to-podcasting-2-0-3c4f61ea17f4
- The Podcast Index
- Podcasting Namespace
- PodPing
- Value-For-Value
Send Symfony logs to Slack
This could be a neat little future video tutorial. I could also do something similar with a Discord bot.
https://manyou.blog/send-symfony-logs-to-slack-with-symfony-notifier-as-a-monolog-handler
What’s a flaky test
A flaky test is a test that sometimes passes and sometimes fails. This usual happens randomly and is incredibly annoying.
What causes flaky tests
- Under powered resources
- Tests running in random order
- Tests not cleaning themselves up afterwards
- External programs or requests interfering with the tests
How to fix flaky tests
- Run tests more regularly
- Separate flaky tests and run them in isolation until fixed
- Only test what is needed based on what has changed
- Don’t ignore or skip tests if you can help it
- Check the environment
- Check inputs for non-deterministic values
- Check timeouts
- Check system resources
- Check for race conditions
- Check if there is any fixed order to the tests
- Keep your tests maintained.
More from How To Code Well
Let's talk about how to test code that you don't controlShow notes: https://howtocodewell.net/podcast/episode/219Support the show and get early access to tutorials courses and moreYouTube membership h…
In today's I practice a new PHP talk that I am hoping to give to PHP user groups this year. The talk is called how to make your PHPUnit tests smarter. Show notes: https://howtocodewell.net/podcast/epi…
In today's show we discuss more Laravel tutorials and look at what is coming in Laravel 12 Show notes: https://howtocodewell.net/podcast/episode/217Support the show and get early access to tutorials c…
In today's show we discuss more Laravel tutorials and dip our toes deeper into the world of OOP. Support the show and get early access to tutorials courses and more YouTube membership https://www.yout…
Today we are going to talk about Laravel collections, conferences and object orientation. Show notes: https://howtocodewell.net/podcast/episode/215 Support the show and get early access to tutorials c…