Giter Site home page Giter Site logo

rajatt95 / testautomationframework_yt_rajat_web_playwright_js Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 4.0 60 KB

This repository contains a Test Automation Framework built using Playwright and Javascript for automated testing of web applications.

Home Page: https://www.youtube.com/@rajatt95

JavaScript 100.00%
chromium github-actions javascript nodejs page-object-model playwright vscode retries screenshot traces

testautomationframework_yt_rajat_web_playwright_js's Introduction


๐Ÿ’ป Test Automation Framework | WEB

Playwright JavaScript

VS Code Playwright HTML Reporter GitHub Actions

๐Ÿ“‘ Table of Contents

๐Ÿ“– Introduction

This repository contains a Test Automation Framework built using Playwright and Javascript for automated testing of web applications.

๐Ÿ› ๏ธ Prerequisites

  • Node.js (v18.16.1 or higher recommended)
  • npm (v9.5.1 or higher recommended)

โ–ถ๏ธ Getting Started

  1. Clone the repository:

    git clone https://github.com/rajatt95/TestAutomationFramework_YT_Rajat_Web_Playwright_JS.git
  2. Navigate to the project directory:

    cd TestAutomationFramework_YT_Rajat_Web_Playwright_JS
  3. Install dependencies:

    npm install

๐Ÿš€ Running Tests

  • Playwright UI mode:

    npm run tests:ui-mode
  • Execution in different browsers:

    • Chrome EdgeFirefox WebKit Chromium
    npm run tests:CHROME
    npm run tests:EDGE
    npm run tests:FIREFOX
    npm run tests:WEBKIT
    npm run tests:CHROMIUM
  • Execution in Headless mode:

    npm run tests:CHROME:HEADLESS

๐Ÿ“ Project Structure

The tests follow a modular and maintainable structure:

|-- .github
|     |-- workflows
|          |-- 01_ui_tests_chrome.yml
|          |-- 02_ui_tests_select_one.yml.yml
|          |-- 03_ui_tests_ALL.yml
|-- pages
|     |-- BasePage.js
|     |-- CartPage.js
|     |-- Components.js
|     |-- LoginPage.js
|     |-- ProductsPage.js
|-- test-data
|     |-- login_credentials.json
|-- tests-saucedemo
|     |-- components.spec.js
|     |-- login.spec.js
|-- utils
|     |-- VerificationUtils.js
|     |-- WaitUtils.js
|-- .gitignore
|-- package.json
|-- playwright.config.js
  • pages: Contains the Page Object Model (POM) classes representing web pages and their elements.
  • playwright-report: Contains the HTML report for tests (Logs, Screenshots, Traces and Videos are attached).
  • test-data: Contains external files (example: login credentials data) that can be used to mock data during tests.
  • tests-saucedemo: Contains the actual test files. You can organize your tests into subdirectories as needed.
  • utils: Contains the Utilities that provides methods for asserting different conditions on web elements, waits.

โš™๏ธ Configuration

  • Modify playwright.config.js for playwright configuration settings such as
    • baseURL
    • testDir
    • reporter
    • fullyParallel
    • video
    • screenshot
    • trace

๐Ÿ”„ Continuous Integration

This project is configured for CI using Github Actions. Check the configurations in .github/workflows/*.yml.

  • 01_ui_tests_chrome.yml: This workflow executes tests in Chrome browser.

  • 02_ui_tests_select_one.yml: This workflow will first ask User to select the browser for tests execution.

  • 03_ui_tests_ALL.yml: This workflow executes the tests in all browsers

    Chrome EdgeFirefox WebKit Chromium

๐Ÿ“Š Reporting

Playwright HTML report (Logs, Screenshots, Traces and Videos are attached) is stored in the playwright-report directory.

๐Ÿ”ญ Other Projects

  • Java - Selenium Appium Rest Assured

  • JavaScript - Cypress Playwright

  • Python - Requests

๐Ÿ“„ Technical Documents

  • Google Drive
  • GitHub Repository

๐Ÿ“ง Contacts

  • Email
  • GitHub Profile
  • GitHub Page
  • LinkedIn
  • Topmate
  • Telegram
  • Instagram
  • YouTube
  • WhatsApp Community
  • WhatsApp Channel

Feel free to reach out if you have any questions, or suggestions, or just want to chat!

Thanks for visiting my GitHub profile! ๐Ÿ˜Š

rajatt95

testautomationframework_yt_rajat_web_playwright_js's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.