Skip to content
SDETRole
SDETRole

Lesson 1 of 12 · Automation Frameworks

Choosing an Automation Tool

A practical framework for choosing between Playwright, Selenium, Cypress, Appium and API tools: criteria, trade-offs and a scored decision you can defend.

intermediate 8 min read Updated

You will learn to

  • Decide what to automate before deciding which tool to use
  • Compare Playwright, Selenium, Cypress and Appium on architecture and trade-offs
  • Evaluate tools against team, application and pipeline criteria
  • Run a time-boxed proof of concept and document the decision

Prerequisites

  • Programming Fundamentals for Testers
  • Introduction to Software Testing

Choosing an automation tool is one of the few decisions in testing that is expensive to reverse. Once a team has a few hundred tests, helpers, CI configuration and people trained on one tool, switching costs months. Yet tool choices are often made by habit (“we used Selenium at my last job”) or hype. This lesson gives you a structured way to make the decision and defend it, which is also exactly what interviewers are probing when they ask “why did your team choose X?”.

Step 1: Decide what to automate first

The tool follows from the tests, not the other way round. Before comparing tools, answer:

  • Which layers need automation? Unit, API/service, UI, mobile, performance, visual.
  • Which flows matter most? Critical business journeys, high-risk areas, frequently regressed features.
  • How often will tests run? On every commit, nightly, before release.

A healthy suite usually has many fast, low-level tests and relatively few slow end-to-end UI tests, an idea often drawn as the test automation pyramid (popularised by Mike Cohn). Many problems that teams try to solve with a UI tool are better solved by API tests, which are faster and far less flaky.

Step 2: Understand the main options

Web UI tools at a glance

Playwright Selenium WebDriver Cypress
Maintainer Microsoft (open source) Selenium project (open source) Cypress.io (open source core, paid cloud)
Languages TypeScript/JavaScript, Python, Java, .NET Java, Python, C#, JavaScript, Ruby, Kotlin JavaScript/TypeScript
Browsers Chromium, Firefox, WebKit builds bundled Any browser with a WebDriver implementation: Chrome, Edge, Firefox, Safari Chrome-family, Firefox, WebKit (experimental)
How it drives the browser Direct protocol connection per browser engine W3C WebDriver protocol via a driver per browser (WebDriver BiDi emerging) Runs inside the browser alongside the app
Auto-waiting Built into actions and web-first assertions Manual: explicit waits (WebDriverWait) Built-in retry of commands and assertions
Multiple tabs / origins Supported Supported Limited; cross-origin needs cy.origin()
Parallelism Built-in (workers, sharding) Via test runner (JUnit, TestNG, pytest) or Selenium Grid Paid Cypress Cloud or third-party approaches
Debugging Trace viewer, UI mode, codegen Depends on runner and IDE Interactive runner with time-travel snapshots

Mobile: Appium

Appium automates native, hybrid and mobile web apps on Android and iOS using the WebDriver protocol. Since Appium 2, platform support comes from installable drivers (for example UiAutomator2 for Android and XCUITest for iOS). If you need real mobile app automation, Appium is the cross-platform default; the platform-native frameworks (Espresso for Android, XCUITest for iOS) are faster but tie you to one platform and usually to developers’ languages.

API tools

For API automation the choice is usually between a language library that lives in your codebase and a GUI tool:

  • Code-based: REST Assured (Java), Playwright’s request fixture (TypeScript), requests with pytest (Python), SuperTest (Node).
  • GUI-first: Postman (with Newman or the Postman CLI for CI), Insomnia, Bruno.

Code-based tools version-control cleanly, share helpers with UI tests and review like any other code. GUI tools are faster to start and friendlier for exploratory API work.

Step 3: Define your criteria

Write criteria down before anyone demos a tool, so the evaluation is not swayed by whichever demo looked slickest. Criteria fall into four groups.

Application under test

  • Platform: web, mobile native, desktop, APIs, or a mix.
  • Browsers required: is Safari a must? Playwright’s WebKit is close to Safari but not identical; Selenium can drive real Safari via safaridriver on macOS.
  • Technical quirks: iframes, multiple tabs, file downloads, shadow DOM, canvas, third-party logins on other domains.

Team

  • Language skills: a Java team will be more productive with Selenium plus JUnit or REST Assured, or Playwright for Java, than with a JavaScript-only tool.
  • Who writes tests: dedicated SDETs, developers, or both? If developers will contribute, matching the application’s language lowers the barrier.
  • Hiring market: can you hire for this skill in your region?

Pipeline and infrastructure

  • Runs headless in containers in your CI?
  • Parallelism and sharding without paid add-ons?
  • Reports and artefacts (traces, videos, screenshots) your team can use when a CI run fails?

Cost and longevity

  • Licence and cloud service costs, including device or browser grids.
  • Community size, release cadence, documentation quality.
  • Maintenance cost: how much code does a typical test need, and how often does it break for reasons unrelated to real bugs?

Step 4: Score the candidates

A weighted scoring matrix turns criteria into a defensible decision. Weight each criterion from 1 (nice to have) to 5 (critical), score each tool from 1 to 5, and multiply.

Here is an example for a hypothetical team: a TypeScript React web app, a team of four SDETs comfortable with TypeScript, Safari support “desirable”, GitHub Actions CI, no budget for paid cloud services.

Criterion Weight Playwright Selenium (Java) Cypress
Team language fit (TypeScript) 5 5 (25) 2 (10) 5 (25)
Built-in waiting / low flakiness 4 5 (20) 3 (12) 4 (16)
Free parallel runs in CI 4 5 (20) 4 (16) 2 (8)
Multi-tab and cross-origin flows 3 5 (15) 5 (15) 3 (9)
Real Safari 2 3 (6) 5 (10) 2 (4)
Debugging failed CI runs 4 5 (20) 3 (12) 4 (16)
Total 106 75 78

The numbers are a judgement for this context, not universal truths. A Java shop with a strict real-Safari requirement and an existing Selenium Grid would weight and score very differently, and Selenium could well win. The point of the matrix is to make the reasoning visible and arguable.

Step 5: Run a proof of concept

Never decide from documentation alone. Time-box a proof of concept (POC) to a few days per shortlisted tool and automate the same small set of real scenarios with each:

  1. A simple happy path, such as logging in.
  2. Your hardest known flow: an iframe payment widget, a file upload, a third-party login, a drag-and-drop.
  3. An API setup step (create data through the API, verify in the UI).
  4. Running the tests in your actual CI, in parallel, and inspecting a deliberately failing test’s report.

Record for each: time to get the first test green, lines of code, flakiness over repeated runs (run each test 20 or more times), and how quickly someone unfamiliar could diagnose the deliberate failure.

For a feel of the two most common choices before a full POC, try the Playwright Lab and the Selenium Lab.

Step 6: Document the decision

Write a short decision record so that the reasoning survives team changes:

Decision: Use Playwright Test (TypeScript) for web UI and API automation.
Date: 2026-11-09
Context: React web app; 4 SDETs with TypeScript experience; GitHub Actions CI;
         Safari desirable but not contractually required.
Options considered: Playwright, Selenium 4 (Java), Cypress.
Decision drivers: language fit, built-in parallelism, trace viewer for CI debugging.
Trade-offs accepted: WebKit is not identical to Safari; a small manual Safari
         check remains in the release checklist.
Revisit when: real-Safari coverage becomes a contractual requirement, or mobile
         native apps are added to scope.

Practice exercise

Pick a product you know (your employer’s, an open-source project, or a public site you use) and produce:

  1. A list of five criteria with weights, specific to that product and team.
  2. A scoring matrix for at least two tools.
  3. A three-sentence recommendation that names the main trade-off you are accepting.

A good result has criteria tied to real facts about the product (not generic “easy to use”), at least one criterion where the losing tool wins, and an explicit “revisit when” condition.

Show a model answer

Context: A Java Spring Boot back end with a server-rendered web UI, a Java-heavy team, an existing Selenium Grid, and enterprise customers who require real Safari and Edge support.

Criterion Weight Selenium 4 (Java) Playwright (Java)
Real Safari via safaridriver 5 5 (25) 2 (10)
Team language: Java 5 5 (25) 5 (25)
Reuse of existing Grid and helpers 4 5 (20) 1 (4)
Built-in auto-waiting 3 2 (6) 5 (15)
CI debugging artefacts 3 3 (9) 5 (15)
Total 85 69

Recommendation: Keep Selenium 4 with Java for the web suite, because real Safari coverage is a customer requirement and the existing Grid and helpers are a large sunk investment that still works. We accept more manual synchronisation code; we will reduce it with a shared explicit-wait helper and stricter locator conventions. Revisit if Safari stops being a contractual requirement, or if flakiness from waiting issues exceeds an agreed threshold.

Note that Playwright wins on two criteria; the decision is driven by weights, and that is visible.

Key takeaways

  • Decide what to automate (layers, flows, frequency) before choosing which tool. Many UI problems are better solved with API tests.
  • Playwright, Selenium and Cypress differ in architecture, language support, browser coverage, waiting and parallelism; Appium covers native mobile.
  • Write criteria and weights before demos; include team skills and long-term maintenance, not only features.
  • Validate with a time-boxed proof of concept on your hardest real flows, in your real CI.
  • Record the decision, the trade-offs accepted and when to revisit it.

Key terms

Finished this lesson?

Progress is saved in this browser. No account needed.

Type to search across SDETRole.

Full-text search by Pagefind · runs in your browser Open search page →