In the era of A.I., automatic testing is often tedious, time-consuming, and rarely given the attention it deserves. But is there a more engaging way to prove that your code works as expected?
This tutorial will showcase how to harness Python tools to write automated tests, ranging from fundamental techniques to advanced approaches that make testing truly effective. Through a hands-on live-coding session, we will follow a top-down approach: starting with principles, we will begin by testing simple functions. From there, we will move on to mocking external dependencies we can control and measuring the effectiveness of those tests. Finally, we will integrate everything tested so far, unveiling a complete testing strategy. The workshop will conclude with a recap and a brief handbook full of tips and more topics to explore.
Throughout the session, we will embrace the entire philosophy of testing: beyond merely spotting bugs, we will see how testing is a powerful tool for designing, understanding, and uncovering hidden issues in our implementation. We will introduce and practice test-driven development (TDD) while also exploring alternative approaches.
Neither extensive knowledge of Python (just some familiarity with classes and basic functions and ability to run Python scripts) nor special tools are required to attend the workshop: a little confidence with the basics is enough to participate, and a working Python environment is all we will need. Instructions will be provided throughout the workshop.
Let's make testing engaging and impactful together. Long live testing!