Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Eran Kinsbruner

Rating No ratings yet

Testing web applications during a sprint poses a challenge for frontend web app developers, which can be overcome by harnessing the power of new, open source crossbrowser test automation frameworks. This book will introduce you to a range of leading, powerful frameworks, such as Selenium, Cypress, Puppeteer, and Playwright, and serve as a guide to using their test coverage capability. You'll learn essential concepts of web testing and get an overview of the different web automation frameworks to be able to integrate them into your frontend development workflow. Throughout the book, you'll explore the unique features of top open source test automation frameworks, as well as their trade-offs, and learn how to set up each of them to create tests that don't break with changes in the app. By the end of this book, you'll be able to not only choose the framework that best suits your project needs but also create an initial JavaScript-based test automation suite. This will enable fast feedback upon code changes and increase test automation reliability. As the open source market for these frameworks evolves, this guide will help you to continuously validate your project needs and adapt to the changes. Who this book is for If you are a frontend developer working with popular frameworks, such as Vue or React, and want to develop testing skills by learning the essentials of test automation, this book is for you. An intermediate-level understanding of JavaScript and frontend development is assumed.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A practical field guide for frontend developers who need to add reliable test automation to their sprint workflow, comparing the leading open source JavaScript frameworks and showing how to choose, set up, and sustain one. Best for developers already comfortable with JavaScript, React, or Vue who want fast feedback without becoming full-time test engineers. 【Book Arc】 - **Opening (~0%–10%)**: Frames why testing inside a sprint is hard for frontend developers and surveys web application types, testing pillars (links, forms, cookies, business flows), and the browser/market realities that make cross-browser coverage necessary. - **Early (~10%–30%)**: Walks through the non-functional pressures — performance, load, accessibility, security — and argues these must shift left rather than wait until the end of a sprint. Then introduces the major frameworks, starting with Selenium's WebDriver/Grid/IDE components and moving into Cypress and Playwright setup. - **Middle (~30%–55%)**: Builds a selection methodology: matching frameworks to personas (frontend developers vs. SDETs) and use cases, weighing ease of adoption, reusability, maintainability, and coverage. Connects frameworks to the leading frontend stacks (React, Vue, Angular, Ember) and their recommended unit, component, and E2E tools. - **Late (~55%–85%)**: Dives into advanced, framework-specific capabilities — Playwright's API testing, network control, visual testing, retry mechanism, Inspector, and code generator; Puppeteer's HAR generation and headless mode — with code examples meant to be used directly. - **Ending (~85%–100%)**: Looks beyond code-based testing to low-code and intelligent record-and-playback tools with self-healing ML features, discussing where they fit in a pipeline and their pitfalls, then closes with references and resources for continued learning. 【Key Takeaways】 - **Testing must shift left into the sprint** (Early): Performance, accessibility, and load concerns are framed as sprint-level activities, not end-of-cycle afterthoughts, because late discovery is expensive and slow to root-cause. - **Framework choice is a persona-and-use-case decision** (Middle): The book argues no single framework fits everyone; frontend developers and SDETs have different skill sets, velocity needs, and scale expectations, so selection should follow a prescriptive methodology rather than hype. - **Selenium remains the mature, standards-based baseline** (Early): Its W3C WebDriver conformance, language bindings, Grid parallelism, and broad browser support make it the reference point, though element locators and waits can be more complex than newer tools. - **Cypress and Playwright trade maturity for developer experience** (Early–Middle): Cypress offers time-travel debugging, a dashboard, and component testing; Playwright, built by the Puppeteer team on CDP, adds API testing, network control, visual testing, retries, Inspector, and a code generator. - **Puppeteer is powerful but narrow** (Middle): It is limited to Chromium browsers with weaker API testing and smaller community support, so it suits specific headless and HAR-generation needs rather than full cross-browser coverage. - **Reusability and maintainability decide long-term cost** (Middle): Page object models, test reusability, and features like Selenium 4's Relative Locators matter because tests must survive product and web landscape changes. - **Combining frameworks is often the best approach** (Middle): Since the major frameworks share JavaScript entry points and test runners like Mocha and Jest, projects can mix tools to capture each one's unique strengths. - **Low-code tools complement, not replace, code-based testing** (Ending): Record-and-playback with self-healing ML adds a coverage layer, but the book flags caveats and pitfalls about where such tools belong in a pipeline. 【Reading Tips】 - Skim the opening chapters if you already know web testing basics; slow down at the framework comparison and persona-matching chapters, which are the book's decision-making core. - Treat the Selenium, Cypress, Playwright, and Puppeteer setup chapters as hands-on labs — type the code rather than copy-pasting, as the book itself advises. - If you work in React or Vue, read the frontend-framework chapter closely to see which unit, component, and E2E tools the community recommends for your stack. - Read the low-code chapter with a skeptical eye: it is about fit and pitfalls, not a replacement for the code-based frameworks covered earlier. - Keep the closing references as a bookmark list for when your chosen framework's roadmap changes. 【Coverage Limits】 This guide is synthesized from stratified excerpts covering roughly the first half of the book plus chapter summaries and the closing chapter description; detailed code walkthroughs in the later framework chapters are not fully represented here.
Page 6
vangelist of the year finalist in 2021 for DevOps.com. His published books include the 2016 Amazon bestseller The Digital Quality Handbook, Continuous Testin...
View in text
Excerpt 2
, it needs to be shifted to the early stages of the sprint. Identifying bottlenecks and performance issues against agreed benchmarks and key performance indi...
View in text
Excerpt 3
built Puppeteer, Playwright is also a CDP-based framework. As opposed to Google's Puppeteer, Playwright supports multiple languages and most leading browsers...
View in text
Excerpt 4
4/06/cypress-component-testing-react/), as well as through standard JavaScript and TypeScript testing specs. Figure 5.4 – Main testing screen for testing a R...
View in text
Excerpt 5
categories of functional and non-functional quality both a structured way of building a test plan and measuring its success, let's take a real-time web appli...
View in text
Excerpt 6
application, and how they work from a quality perspective. • Product requirements coverage – this pillar refers to all the product user stories and capabilit...
View in text
Excerpt 7
ore Capabilities of the Leading JavaScript Test Automation Frameworks, all leading test automation frameworks can easily integrate with the leading axe acces...
View in text
Excerpt 8
the rich plugin archive, API testing, and the test retries. While these are not all the features in this massive framework but it is a great list to focus on...
View in text
Tags
AI categories
Web TechnologyJavaScriptSoftware
Publisher: Packt Publishing
Publish Year: 2022
Language: English
Pages: 301
File Format: PDF
File Size: 5.5 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…