Testing Playwright

Experiencing Playwright first hand

12/21/2022

Haripriya Mathavan

Hi, I am Haripriya

This Blog is about my experience in PLAYWRIGHT @geprog. I have started my work with GEPROG in exploring cross-browser testing, and E2E (end-to-end) testing of the web using the Playwright framework. Below I have summarized the objectives which I had in my mind from Day 0 @geprog.

  • Learn what is end-to-end testing in general and the best practices.
  • Learn features, tools and API in the Playwright framework.

To understand more about Playwright test runner and Playwright tools for debugging and thereby understand the best practices for testing scripts and other scenarios.

AboutME

I have a bachelor’s in information technology with software development experience in smart TV, chatbot and intranet applications. I am familiar with React JS, HTML, CSS, C#, ASP.NET and of course now PLAYWRIGHT. I am from India and my little champ is 21 months old.

AboutGEPROG

G – GREAT

E – ENVIRONMENT

P – PROFICIENT &

R – RESPECTABLE

O – ORGANIZATION.

G – GAMECHANGER in every way.

Why PLAYWRIGHT

Manual testing can be a time-consuming process and cause human errors. It is really difficult to track down the source and search through multiple layers of code to find the cause. It would be great if there is a way to automate testing. Playwright is an automated testing tool that makes sure the website is functioning correctly. Moreover, Playwright helps to reduce time by simulating user interactions.

AboutPLAYWRIGHT

Playwright is an open-source framework which can be used for web testing and automation. Using Playwright, it is possible for cross-browser testing across chromium, Firefox and Web Kit with a single API. In simple terms, Playwright enables Web Automation. Pros of Playwright are as follows. A built-in test runner (Playwright test).

  • There is an option to use 3rd party test runners.
  • Wide range of API support for JavaScript, Typescript, Java, .NET and Python.
  • Linux / Windows / macOS – Browser binaries are available.
  • Mobile User experience can be validated using device emulation support.
  • VS code extension has features to run tests, debug step by step, and explore selectors.
  • View execution results like traces, error logs, video recordings and screenshots.
  • Parallel test execution.
  • Reuse the signed-in state, to enable tests to start as a logged-in user.
  • Auto waiting built-in and custom waits until the element/popup loaded.
  • Supports device-specific events like hovering with the mouse.
  • Provides docker images that have dependencies and browsers baked in.
  • Visual comparisons to view the component before and after the update.
  • Some cons of Playwright are as follows.
  • Has no support for Legacy Microsoft Edge, IE11 or non-browser platforms.
  • Playwright uses desktop browsers instead of real devices to emulate mobile devices.
  • It is a very new framework so the APIs are evolving.

MyWorkWithPLAYWRIGHT

My first few days with Playwright started with reading documentation about Playwright, installation, running sample tests, getting to know GitLab, Gitpod, Work Adventure and so on. My first Hands on started with creating test cases for Bookyp. It is a web app developed by Geprog which allows users to book their work station well in advance.

  • The following things were done for bookyp project
  • Create space
  • Filter Bookables
  • Map editor – Drawing walls
  • Add/Move/Delete – Table and Wall
  • Translating map and zooming in/out
  • Create a common space

A single brick alone is not enough to construct a building. Same way with anything I have learned until now would not be possible without Team Geprog. I express my deepest thanks to Marius & Ellen for their trust in me and for giving me an opportunity to be a part of your team. Finally, a big thanks to all my colleagues, who have helped me with every single question I had.

Thank you, TEAM!!! Thank you, GEPROG!!!

test
framework
Zurück zum Blog