5.6 End-to-End Tests
Theoretically, testing frameworks such as Vitest enable you to cover all levels of the test pyramid. This class of frameworks is best suited for the formulation of unit and integration tests. There are separate frameworks for end-to-end tests, such as Selenium, Cypress, or Playwright, which have specialized in making the implementation of end-to-end tests as convenient as possible for you.
In the following sections, you’ll learn how to use Playwright to generate an end-to-end test for a simple login form. The form has an input field for the username and one for the password. There is also a button for sending the form. The form is transmitted via a JavaScript function. Upon successful login, users are redirected to the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access