2025-04-23 –, Main hall
Web applications with a high degree of interoperability between the browser and the server can be difficult to test. This is especially true during full stack development. There, we usually don’t specify REST endpoints with a well declared interface. This is especially true when working with template partials (HTMX, django-unicorn, etc.). Testing the server and client part independently requires to mock these interfaces, which then becomes even more difficult and time consuming.
If we consider a web application as an inseparable unit, it becomes beneficial to replace classic unit testing against end-to-end testing. By using Pytest, we can write these tests in a similar way to classic unit tests by replacing Beautifulsoup against Playwright. This then allows us to proceed with a similar testing setup but against a dynamic DOM instead of some statically rendered HTML.
In this talk I will show how to evolve unit tests using Beautifulsoup into end-to-end tests using Playwright.
Intermediate
Topics –Testing
Jacob Rief graduated with a master in physics from the University of Innsbruck. He then worked for many years as a software developer, system architect and consultant for different companies, before returning to his Alma Mater five years ago. There he’s in charge of evolving the main Content Management System of the university. Jacob is also an eager Open Source contributor and maintainer of a few popular third party packages around the Django ecosystem. His main focus is on Django, Python, JavaScript and web development in general.