Using Code Smells to Fix Flaky Cypress Tests

code smells

Introduction

We recently attended the webinar event hosted by Cypress on how to use code smells to fix flaky Cypress tests. This is where we gathered solid knowledge on improving our testing scripts. More specifically, we do it by avoiding a series of common mistakes, which would usually lead to <Flaky Tests>. 

As a preview, we want to share with you the concepts of 3 main code smells. They aim to categorize the most common mistakes we make in our code, for example:

Main code smells

  • Unprepared Element (Symptom: an element is present but doesn’t behave the way it does in manual testing).

  • Flickering Element (Symptom: “cy.click() failed because this element is detached from the DOM,” yet the element is still visible on the page).

  • Impatient Test (Symptom: the test fails without waiting for the condition that would cause it to succeed).

If you want to learn more about using code smells to fix flaky Cypress tests, look over the webinar support. Plus, you’ll also learn how to avoid these scenarios and about proposed fixes in case, they do happen. 

https://cypress.slides.com/cypress-io/code-smells

You can also watch the recorded version on Youtube:

https://youtu.be/JlBCdRlvPWk

Stay Updated with the Latest in QA

The world of software testing and quality assurance is ever-evolving. To stay abreast of the latest methodologies, tools, and best practices, bookmark our blog. We’re committed to providing in-depth insights, expert opinions, and trend analysis that can help you refine your software quality processes.

Visit our Blog

Delve deeper into a range of specialized services we offer, tailored to meet the diverse needs of modern businesses. As well, hear what our clients have to say about us on Clutch!

Share the Post:

More GoodReads