Modernizing Integration Testing with Playwright (GSoC 2026)

I’m writing to introduce myself as a prospective GSoC 2026 contributor for the Django Software Foundation. I am particularly interested in the project: “Switch to Playwright tests for integration testing.”

I have a background in Django backend development, but my core expertise is in DevOps, Cybersecurity, and automation pipelines (e.g., n8n). I believe this project is a perfect fit for me because it’s not just a coding task; it’s an infrastructure modernization effort.

I have been preparing intensively and have two key technical artifacts to share:

1. Standalone API Research: I built a “Playground” repository to evaluate both Playwright’s Sync vs Async APIs alongside Django’s database transactions and @pytest.mark.django_db. (Link: GitHub - Gaurav5189/django-playwright-test · GitHub )

2. Core Framework PoC (Branch): I have successfully implemented a working PlaywrightLiveServerTestCase prototype within my django/django fork. The biggest hurdle I overcame was an async/sync collision. Starting Playwright in setUpClass() left an active event loop during Django’s database teardown, which threw a SynchronousOnlyOperation error.

To resolve this, I refactored the lifecycle management to start/stop the browser instance strictly within setUp() and tearDown() at the test level, ensuring state isolation and framework stability. I also implemented a conditional HAS_PLAYWRIGHT import with a @unittest.skipUnless decorator to ensure the core test suite remains stable for other contributors without the dependencies installed. (Link to my fork branch: gsoc-playwright-django-tests-PoC/django/test/playwright_core_poc at main · Gaurav5189/gsoc-playwright-django-tests-PoC · GitHub )

Question: As I finalize my proposal, is the preferred implementation path to introduce this as a completely new base class (like PlaywrightLiveServerTestCase), or should the ultimate goal be to refactor the existing Selenium classes to support a pluggable browser backend?

I am eager to contribute to Django core and improve the testing ecosystem for the entire community. I look forward to your feedback.

Thank you,

Gaurav sethi

1 Like