GSoC 2026 - Interested in "Switch to Playwright Tests"

Hi @DevilsAutumn! :waving_hand:

My name is Kusumapriya Meda, a B.Tech Information
Technology student (2024-2028) at Malla Reddy
Engineering College for Women, Hyderabad, India.

About me:

  • Python intermediate level developer
  • 500+ problems solved on CodeChef (Gold Badge) :sports_medal:
  • CISCO Certified (C & Python)
  • WIPRO Full Stack Certified (ID: CRZ74679)
  • Learning FastAPI, Django, and Docker
  • GitHub: github.com/kusumapriya-meda

I am very interested in contributing to Django
for GSoC 2026. I am particularly interested in
the “Switch to Playwright Tests” project
(175hr, Medium difficulty) as it aligns well
with my Python skills.

I am eager to learn, hardworking, and fully
committed to delivering quality work during
the GSoC period. I would love to connect with
a mentor and start contributing to Django!

Thank you so much for this opportunity! :folded_hands:

  • Kusumapriya Meda

GSoC 2026 Proposal: Switch to Playwright Tests for Integration Testing

Applicant

Mohamed Saeed
Information Technology Student, Egyptian E-Learning University
Junior AI & ML Student | Software Developer | ISTQB Foundation Level Certified Tester


Abstract

Django currently relies on Selenium-based browser integration tests. While Selenium has served Django well, its tests are relatively slow, more difficult to maintain, and occasionally flaky because of explicit waits and browser synchronization issues.

This project proposes migrating Django’s browser integration testing infrastructure from Selenium to Playwright. Playwright provides automatic waiting, improved debugging tools, parallel execution, cross-browser consistency, and a simpler API.

The main goal of this project is to create a Playwright-based testing foundation inside Django, migrate the existing Selenium tests incrementally, and ensure the complete suite works reliably in Django’s CI pipeline.


Problem Statement

Django’s current integration tests depend on Selenium and custom browser setup logic. This introduces several limitations:

  • Tests are slower than modern browser automation frameworks.

  • Synchronization often requires explicit waits and brittle timing logic.

  • Debugging failed tests is difficult.

  • Browser tests are more likely to become flaky in CI.

  • Contributors who want to write new integration tests face a higher learning curve.

Playwright addresses these issues through:

  • Automatic waiting for page elements and events.

  • Faster execution and easier parallelization.

  • Built-in support for Chromium, Firefox, and WebKit.

  • Better debugging through traces, screenshots, and videos.

  • Cleaner and more maintainable test code.


Proposed Goals

  1. Introduce a new PlaywrightTestCase integrated with Django’s LiveServerTestCase.

  2. Create an AdminPlaywrightTestCase equivalent for Django admin integration tests.

  3. Add Playwright dependency handling and optional test execution.

  4. Migrate existing Selenium-based tests to Playwright gradually.

  5. Ensure all migrated tests pass in Django’s GitHub Actions CI.

  6. Document the new workflow for future contributors.

  7. Remove Selenium-based infrastructure once the migration is complete and stable.


Technical Approach

1. Build Playwright Base Classes

I will implement:

class PlaywrightTestCase(LiveServerTestCase):
    ...

class AdminPlaywrightTestCase(PlaywrightTestCase):
    ...

These classes will:

  • Start and stop Playwright automatically during test setup and teardown.

  • Launch browser contexts in isolated sessions.

  • Provide helper methods similar to Django’s existing Selenium test utilities.

  • Support Chromium initially, with future compatibility for Firefox and WebKit.

The design will remain close to the existing Selenium API so that migration requires minimal code changes.

2. Parallel Transition Strategy

Instead of removing Selenium immediately, Playwright will initially coexist with Selenium.

During the transition:

  • Existing Selenium tests will continue to work.

  • New Playwright tests will be introduced incrementally.

  • CI will run both systems until the Playwright version becomes stable.

This reduces risk and avoids breaking Django’s current testing workflow.

3. Migration of Existing Tests

The migration will happen module-by-module.

Priority order:

  1. Small and isolated browser tests.

  2. Admin integration tests.

  3. Popup and JavaScript interaction tests.

  4. Remaining Selenium-based modules.

Special attention will be given to:

  • Window and popup handling.

  • JavaScript alerts and confirmations.

  • Form submissions and dynamic page updates.

  • Authentication and admin login flows.

4. CI Integration

I will update Django’s CI pipeline to:

  • Install Playwright browsers automatically.

  • Run Playwright tests in GitHub Actions.

  • Generate useful debugging output when failures occur.

  • Ensure compatibility across supported Python and browser versions.

Example:

python -m playwright install


Expected Deliverables

By the end of the project, Django will have:

  • A fully functional PlaywrightTestCase.

  • Migrated browser integration tests.

  • Playwright support integrated into CI.

  • Documentation for contributors.

  • A clear migration path away from Selenium.


Timeline (175 Hours)

Community Bonding Period

  • Study Django’s current Selenium-based test architecture.

  • Discuss implementation details with mentors.

  • Finalize migration order and project scope.

  • Create a proof-of-concept branch.

Week 1

  • Set up local Playwright environment.

  • Explore Django’s current browser test utilities.

  • Design the PlaywrightTestCase API.

Week 2

  • Implement PlaywrightTestCase with browser startup and teardown.

  • Add helper methods and browser context management.

Week 3

  • Implement AdminPlaywrightTestCase.

  • Test login and admin-related flows.

Week 4

  • Configure Playwright installation and optional dependency handling.

  • Add initial CI support.

Week 5

  • Migrate the first set of simple Selenium tests.

  • Validate reliability and maintainability.

Week 6

  • Migrate admin-related integration tests.

  • Handle forms, login, and page interactions.

Week 7

  • Implement popup, multi-window, and JavaScript dialog support.

  • Port the related Selenium tests.

Week 8

  • Continue migration of the remaining Selenium modules.

  • Refactor duplicated helper code.

Week 9

  • Improve CI stability and fix flaky behavior.

  • Add tracing and debugging support.

Week 10

  • Write contributor documentation.

  • Document how to write and run Playwright tests.

Week 11

  • Run complete regression testing.

  • Address mentor review comments.

Week 12

  • Final cleanup.

  • Remove obsolete Selenium infrastructure where appropriate.

  • Submit final report and pull requests.


Risks and Mitigation

Risk Mitigation
Some Selenium behaviors do not directly map to Playwright Introduce compatibility helper methods and phased migration
Browser-specific failures in CI Start with Chromium, then test additional browsers gradually
Migration takes longer than expected Prioritize core tests first and leave optional modules for follow-up
Playwright lifecycle conflicts with Django test teardown Keep browser initialization inside setUp() / tearDown() to avoid async conflicts

Why I Am a Good Fit

I have a strong background in Python, testing, and software engineering. I am an ISTQB Foundation Level Certified Tester and have experience with automation, debugging, and structured software development.

Through my academic and project work, I have:

  • Built multiple software projects using Python and web technologies.

  • Worked with testing methodologies and QA practices.

  • Contributed to complex systems involving maintainability and scalability.

  • Studied Django and browser-based testing workflows.

Additionally, my experience as both a software developer and tester allows me to understand the project from two perspectives: improving developer experience and improving test reliability.


Conclusion

This project will modernize Django’s browser integration testing infrastructure and provide a faster, more maintainable, and less flaky alternative to Selenium.

By introducing Playwright carefully and incrementally, Django can adopt a modern testing framework without disrupting the existing ecosystem. The result will be a more reliable contributor experience and stronger long-term testing support for the Django project.