Book Image

A Frontend Web Developer’s Guide to Testing

By : Eran Kinsbruner
3 (1)
Book Image

A Frontend Web Developer’s Guide to Testing

3 (1)
By: Eran Kinsbruner

Overview of this book

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 cross-browser 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 leveraging their test coverage capability. You’ll learn essential concepts of web testing and get an overview of the different web automation frameworks in order 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 not only be able to choose the framework that best suits your project needs but also create your 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.
Table of Contents (19 chapters)
1
Part 1 – Frontend Web Testing Overview
7
Part 2 – Continuous Testing Strategy for Web Application Developers
11
Part 3 – Frontend JavaScript Web Test Automation Framework Guides

What this book covers

Chapter 1, Cross-Browser Testing Methodologies, covers the most advanced web technologies and web application types you will come across, including responsive and progressive types. It is specifically designed to cover the main trends that typically impact web application developers, along with the various testing types that are relevant for such applications.

Chapter 2, Challenges Faced by Frontend Web Application Developers, covers the key challenges modern web application developers face and their root causes. It is specifically designed to cover the constant debate about velocity, quality, and key non-functional challenges that are a pain for developers.

Chapter 3, Top Web Test Automation Frameworks, focuses on the top four leading open source frameworks on the market and provides an intermediate tutorial on how to get started with each of these.

Chapter 4, Matching Personas and Use Cases to Testing Frameworks, provides a set of considerations to help the two main personas within web application development and testing (developers and test automation engineers) to choose the best test automation framework for their needs.

Chapter 5, Introducing the Leading Frontend Web Development Frameworks, looks at the test frameworks from the web development and application perspectives and provides guidelines on how to ensure that your test framework best fits the application type, as well as the web development frameworks used to build these apps.

Chapter 6, Map the Pillars of a Dev Testing Strategy for Web Applications, looks at how to combine the relevant considerations into a testing strategy that covers all quality aspects and continuously meets the end user experience. In addition, it offers frontend developers key metrics that can be used to monitor and measure the success of the strategy.

Chapter 7, Core Capabilities of the Leading JavaScript Test Automation Frameworks, provides an overview of the most critical testing capabilities that are required for web applications and provides the recommended test framework to go with each capability.

Chapter 8, Measuring Test Coverage of the Web Application, provides guidelines for how to complement the quality assessment of your web application with code coverage across the various test automation frameworks featured in this book (Selenium, Cypress, Playwright, and Puppeteer).

Chapter 9, Working with the Selenium Framework, provides you with a deep technical overview of the Selenium framework with a focus on the advanced capabilities, including support for CDP, relative locators, visual testing, cloud testing, behavior-driven development (BDD) testing, and self-healing add-ons.

Chapter 10, Working with the Cypress Framework, provides a technical overview of the framework with a focus on its advanced capabilities, including time travel, component testing, network control, API testing, supported plugins, and cloud testing.

Chapter 11, Working with the Playwright Framework, offers a technical overview of the framework with a focus on the advanced capabilities of Playwright, such as API testing, network control, visual testing, the retrying mechanism, Inspector, and the code generator tool.

Chapter 12, Working with the Puppeteer Framework, provides a technical overview of the framework with a focus on the advanced capabilities, including HAR file generation and using headless mode for testing. The chapter comes with some code-based examples that can be used out of the box.

Chapter 13, Complementing Code-Based Testing with Low-Code Test Automation, discusses how, while the open source community offers a wide range of coding test frameworks, as highlighted in this book, there are also new and emerging intelligent testing solutions that can combine their record and playback abilities with self-healing machine learning-driven features to provide an additional layer of test automation coverage. In this chapter, we uncover the available options on the market, the relevant places and use cases to use such tools within a development pipeline, and the caveats or pitfalls to be aware of.

Chapter 14, Wrapping Up, concludes the book with a set of references, additional blogs, and websites to bookmark to expand on the content offered in this book.