QAAutomationLabs

QAAutomationLabs

Way to upgrade your skills

Automate Playwright Test Cases With CI/CD GitHub Actions

What are GitHub Actions GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline. You can create workflows that build and test every pull request to your repository... Read More "Automate Playwright Test Cases With CI/CD GitHub Actions"

Execute Cypress Test Cases in WebKit(Safari)

This blog covers how we can execute Cypress Test cases in WebKit(Safari) In version 10.8.0, Cypress.io team has introduced the support of the WebKit(Safari) browser Cypress has experimental support for WebKit, Safari’s browser engine. Testing... Read More "Execute Cypress Test Cases in WebKit(Safari)"

How to Run Playwright test case in CI/CD Jenkins

In this blog, I will talk about the Integration of Playwright with Jenkins. Jenkins is a self-contained, open-source automation server that can be used to automate all sorts of tasks related to building, testing, and delivering or deploying... Read More "How to Run Playwright test case in CI/CD Jenkins"

Generate Allure HTML report with Playwright | How to Generate Allure HTML report in playwright with Java Script

This blog covers how we can generate an Allure HTML report using a playwright Why is Allure Reporting to Playwright? Easy to installAllure reports provide great presentational diagramsClear and nice reporting UICan easily investigate test... Read More "Generate Allure HTML report with Playwright | How to Generate Allure HTML report in playwright with Java Script"
Featured

How to Setup And Run Cypress Test Cases in Google Cloud?

Cypress google cloud integration

This blog cover how we can set up the code in google cloud and run the cypress test case

Pre-Condition

  1. User already logged in to Google Cloud
  2. User in google cloud Dashboard https://console.cloud.google.com/home/dashboard

Steps to Set up the Code In Google Cloud

*Step 1: In the Dashboard from the left side click on ‘Cloud Build” under CI/CD section

Cypress google cloud integration

*Step 2 Click on Cloud Build -> Triggers

Cypress google cloud

After clicking on the Triggers below screen is open

Cypress google cloud integration

*Step 3 Enter Name, Select the Region

Cypress google cloud integration

*Step 4 Select Source and Connect to the repository

Cypress google cloud integration

*Step 5 Select GitHub Account and Select repository

Cypress google cloud integration git repo

The project package.json file looks like the given below.

We will run test cases by giving cy:report (#line 11) in our .yaml file

Cypress test case run in google cloud

{
“name”: “cypress_dashboard”,
“version”: “1.0.0”,
“description”: “”,
“main”: “index.js”,
“scripts”: {
“cleanup”: “rm -fr cypress/reports”,
“merge_reports”: “mochawesome-merge cypress/reports/mochawesome-report/*.json > output.json”,
“mochawesome_report”: “marge — reportDir cypress/reports/mochawesome-html-report -t Cypress_Test_Report -p Cypress_HMTL_Report -f Cypress_HMTL_Report — charts true output.json”,
“cy_dashboard”: “cypress run — record — key aeed922c-98af-4143–9e77-f97c6c900754”,
“cy:report”: “npm run cleanup && npm run cy_dashboard && npm run merge_reports && npm run mochawesome_report”
},
“author”: “Kailash”,
“license”: “ISC”,
“devDependencies”: {
“cypress”: “⁶.8.0”,
“mocha”: “⁸.3.2”,
“mochawesome”: “⁶.2.2”,
“mochawesome-merge”: “⁴.2.0”
}
}

*Step 6 Under the Configuration select “Cloud Build configuration file (yaml or json)”

cloudbuild.yaml file looks like see below

In the below YAML we can see first we are installing dependencies then in Cypress image /include:7.0.1 we are running our test cases

Cypress google cloud integration .yaml file

Step 7 Click on the “Create” button below the screen open

Steps to Run the Test Cases

Step 1 Click on the RUN button from the above screen

Cypress google cloud integration

*Step 2 Click on the RUN TRIGGER button from the above screen. Build start running

Cypress google cloud integration

Test case start running see below screen

Cypress google cloud integration