Automated Web App Testing with PlayWright

Testing


Objective

Reduce manual testing to increase rate of responsiveness to business change request and reduce risk of regression.

Technical Goals/Overview

Automate web app testing. Additional considerations: Test iteration development cycles should be minimal, that is, ‘reduce thrashing’ and ‘quick turn around’ by assisted automated code generation. Testing should support headless testing and be able to run in a CI/CD pipeline.

Summary: Technical Implementation

  1. Project Setup
    • Python Environment
    • Add Pytest and PlayWright Packages
  2. Develop Tests
    • Identify ‘non-brittle’ test cases and scenarios.
    • Identify specific and unique selectors with a consideration of minimizing change. That is, selectors should be stable and not change with each release.
    • Create tests and confirm tests pass and fail as expected.

Overall, automated testing for a web app reduces development effort. A substantial advantage can be achieved when you avoid manual testing, brittle tests, and can develop tests quickly. Additionally, we’re making sure these tests can be done without a visible browser and can be run in a pipeline that helps us keep our development process smooth.


Skills Footprint:

Category Technical Specifics
general Test Automation
standards
tools VSCode * GIT * Python * PyTest * PlayWright
concepts Regression Testing * Continuous Integration * Continuous Deployment * Refactoring * Clean Code
packages pytest * playwright