This article appeared as a Pybites email first. If you like it consider joining our friends list for weekly Python, developer and (!) mindset content … Last year I built a cool API to post code images using our pybites-carbon tool. It will store the tip code in a database and store the code image in an… Continue reading Building a 500 line API regression test suite
Articles on Testing
10 Cool Pytest Tips You Might Not Know About
By Bob Belderbos on 26 February 2021
Here are 10 things we learned writing pytest code that might come in handy.
Assertions About Exceptions With pytest.raises()
By AJ Kerrigan on 18 May 2020
It’s useful to test for exceptions exceptions in your code. A handy feature of pytest makes that fun and flexible!
How to Debug a Hanging Test Using pytest
By Bob Belderbos on 18 March 2020
Today a wanted to share a neat trick that might save you some headache: debugging a hanging test.
Exploring the Mutpy Library and How PyBites Uses it to Verify Test Code
By Harrison Morgan on 9 February 2020
A while back we launched our Test Bites. In this follow up article Harrison explains the MutPy mutation testing tool in depth and how we use it to verify test code on our platform. Enter Harrison.
You can now hone your testing / pytest skills on our platform
By Bob Belderbos on 18 November 2019
Writing test code is an essential skill. As PyBites we believe writing code is the only solution to becoming a master (Ninja) at programming. The same applies to test code. For that reason we extended our regular exercises with Test Bites. In this article you will read about the feature showcasing it on our first ever Test Bite. We also share some details around implementation and a challenge we hit getting it to work. Enjoy and start honing your testing skills today!
How to Cleanup S3 Objects and Unittest it
By Giuseppe Cunsolo on 2 September 2019
In this guest post Giuseppe shares what he learned having to cleanup a large number of objects in an S3 bucket. He introduces us to some boto3 as well as moto and freezegun he used to test his code. Enter Giuseppe …
How to Test Your Django App with Selenium and pytest
By Bob Belderbos on 22 November 2018
In this article I will show you how to test a Django app with pytest and Selenium. We will test our CodeChalleng.es platform comparing the logged out homepage vs the logged in dashboard. We will navigate the DOM matching elements and more. Overall you should learn enough Selenium and pytest to start testing a web page including a login. Sounds exciting? Let’s dive straight in!
Why Python is Great for Test Automation
By Andrew Knight on 25 July 2018
Testing in Python is consistently growing in popularity. In this article our friend Andrew Knight from Automation Panda walks through 10 reasons why Python is great for Test Automation.
All You Need to Know to Start Using Fixtures in Your pytest Code
By Bob Belderbos on 15 March 2018
Setting up test cases for code that manage data can be challenging but it’s an important skill to reliably test your code. You might have heard of the setup and teardown methods in unittest. In pytest you use fixtures and as you will discover in this article they are actually not that hard to set up. Fixtures have been labelled pytest’s killer feature so let’s explore them in this article using a practical example.