How to Perform Visual Regression Testing Using Playwright

Regression testing verifies that system changes do not interfere with existing features or code structure. They are part of almost every test suite in software development lifecycles. It is common for developers to change or add a code section and unintentionally disrupt something that is working just fine.

Visual regression testing functions on the same logic but confines it to the visual aspects of the software. It works by comparing two images and automating complicated scenarios, like when we cannot identify the elements in the DOM tree. However, visual regression can be used on any website.

How to Perform Visual Regression Testing Using Cypress

Software testing is a critical phase of the SDLC process. Early testing saves a lot of cost and effort — low-quality software can lower customer retention by impacting user engagement negatively. It is therefore essential to build software that is bug-free to increase sales and make the product that much more popular. 

There are different types of testing, such as smoke, sanity, integration, regression, unit testing, and API testing. Regression testing is one of the most important kinds of testing, especially when new features or updates are added to an existing application.

Test React Native Apps With Cypress

This way we can test React Native Apps in Cypress. Furthermore, we can set the viewport and change it to a different device resolution in order to test the mobile web applications as well. Cypress is a modern tool for test automation, popular because of its ease of installation, inbuilt support for the various reports, and its capability to write Unit, API, and End to End Tests. 

Cypress supports almost all modern architecture development frameworks such as Angular, React Native, Vu, as well as MVC-type frameworks.

Cypress Automation Tutorial

What Is Test Automation?

Test Automation is a way of verifying and validating test scenarios via specific tools and frameworks. QAs create automated scripts, feed them into automation tools that launch the application, run through the test scenario, and mark the test as passed or failed.

Test Automation is recommended for repetitive scenarios only since it saves time and effort that would otherwise have to be put in by human testers.

How to Run Playwright Tests Sequentially in Same Browser Context

The Playwright is a new automation framework by Microsoft. The Playwright framework is distributed under MIT Open Source License. Playwright supports various programming languages such as Java, JavaScript, TypeScript, .Net, etc. 

Playwright Executes Each Scenario in Its Own New Browser Context

If you have worked with the Playwright framework you might have observed that if you write multiple tests inside the describe function, it gets executed one after another but each test runs in a separate browser context. That means that if you have performed a login in test1() it doesn't preserve those in test2(). The reason is that each time playwright executes the test, it creates a new context and executes the test. This feature also allows you to write independent tests and you can execute them parallelly with less execution time.

Cypress Tests: Preserve Cookies and Keep Login Session Active

By default, Cypress resets the sessions before each test. If you are logged in scenario first test (ex: it() block), then in the second test (second it block), and you are performing some other task, you are automatically taken back to the login page. This happens because Cypress doesn’t keep the session; it creates a new session. In end-to-end testing, mostly, users will be logged first and then all the workflow will be checked. This article explains the simplest way to overcome this problem using just a few lines of code.

Let me explain this scenario:

Setup Cypress Tests in Azure DevOps Pipeline

This tutorial helps to integrate and run your Cypress tests with the Azure DevOps pipeline in an Easy Way

Pre-Requisite:

  1. You need to have already cypress framework up and running on your local machine
  2. Cypress Project should be checked into the repository
  3. Your framework should generate a JUnit XML file at the end of the execution of the test. If you are not sure how to do that refer to Generating JUnit XML article.

Step by Step Guide To Run / Set-Up Cypress Tests in Azure DevOps or TFS Pipeline CI/CD

This tutorial explains the easy way to configure and run Cypress Test Automation Framework into Azure DevOps. 

How to Set up TestCafe and TypeScript JavaScript End-to-End Automation Testing Framework From Scratch

What is TestCafe?

TestCafe is a non-selenium-based open-source JavaScript End to End Automation Testing Framework built with NodeJS. TestCafe supports JavaScript, CoffeeScript, and TypeScript.

TestCafe is nowadays very popular since it is very stable and follows an easy setup.TestCafe does not depend on Selenium or other testing software. TestCafe runs on the popular Node.js platform and makes use of the browsers that you already have.

Getting Started With WebdriverIO Typescript Jasmine

What is WebdriverIO?

WebdriverIO is a progressive automation framework built to automate modern web and mobile applications. It simplifies the interaction with your app and provides a set of plugins that help you create a scalable, robust, and flakiness test suite. WebdriverIO is built on top of Selenium NodeJS bindings.

Webdriver IO is Open Source Framework managed by OpenJS foundation and follows W3 framework architectural standards

Protractor End of Support, Future of Angular E2E, Best Alternative Tools

Many angular and react project is running on Protractor Testing Framework, however, Protractor has recently announced the end of support 2022. Also, there are many users who want to explore Cypress End to End Test Automation Framework, This article explains and answers the most common question while exploring Cypress Test Automation Framework

The Protractor is dying!!! Google announced the protractor end of support/development. 'The Angular team plans to end development of Protractor at the end of 2022 (in conjunction with Angular v15).' So protractor users left with no other option than to migrate their test cases Since Protractor announced the end of life now everyone has only one question, What is the best alternative to the protractor end-to-end testing? Can Cypress Automation tool replace the Protractor or should we consider other tools?

Configure Cypress Tests to Run on Multiple Environments

One of the most common scenarios in an automation framework is to run scripts on different environments like QA, staging, production, etc. There are multiple ways to configure your Cypress framework to run on different environments. I am going to show the three most used methods

In this article, I have explained 3 different methods to run your Cypress tests on multiple environments.

Schedule Pipelines in Azure DevOps Using Cron Expressions

Azure DevOps UI provides an option to trigger multiple days or once a week. We know that many times we need to execute Azure DevOps pipeline triggers once a month, or twice a month, and this can be done using Cron Expressions in Azure DevOps.

Azure DevOps uses NCronTab to evaluate cron expressions, so advanced expressions are not fully supported by Azure DevOps. However, most of the expression is supported so it does the job.

7 Easy Steps to Generate Both XML and HTML Reports in Cypress

The common requirement when we are working with automation tests in we need to generate both XML and HMTL reports. When it comes to Cypress it relies on Mochawesome reporter. In this article, I will explain to you a simple way to generate HTML and Junit XML reporter in your Cypress end-to-end Automation framework. 

If you look over the internet there are many articles but for beginners, it's very complicated Since there is some complexity involved. 

How to Set up Cypress and Typescript End-to-End Automation Testing Framework From Scratch

This article explains creating or setting up a cypress.io end-to-end testing framework from scratch using Typescript. Unlike another tutorial, this explains setting up the Cypress framework using Typescript in a simple and easy way. This article is helpful for whoever wants to set up the Cypress Typescript automation framework for the first time. Also, I know that there are many, migrating from different automation frameworks like Protractor, webdriver.io, etc. this will be helpful for them too.

This Tutorial shows page object model creation as well, however you can use it for any type of framework by skipping those steps.

How to Do API Testing?

Nowadays API testing is an integral part of testing. There are a lot of tools like postman, insomnia, etc. There are many articles that ask what is API, What is API testing, but the problem is How to do API testing? What I need to validate.

Note: In this article, I am going to use postman assertions for all the examples since it is the most popular tool. But this article is not intended only for the postman tool.