Giter Site home page Giter Site logo

karpenko3d / starter-playwright Goto Github PK

View Code? Open in Web Editor NEW

This project forked from charlyautomatiza/starter-playwright

0.0 0.0 0.0 7.04 MB

Boilerplate project for Web/API Test Automation created live on Twitch based on Playwright - TypeScript - Allure Report - Lighthouse

Home Page: https://charlyautomatiza.tech

TypeScript 100.00%

starter-playwright's Introduction

Twitch Discord

🎭 Playwright

Web Test Automation - Playwright

Boilerplate project created live on Twitch.tv/CharlyAutomatiza based on Playwright, TypeScript, Allure Report

You can access my YouTube channel for more information about this and other automated testing frameworks.

Playwright Tests

Overview

Esta documentación está disponible también en Castellano.

General requirements

Download and install

  • Latest version of Node.js
  • Java Development Kit (JDK)
    • Make sure you have the environment variable JAVA_HOME set to the path of the respective JDK. (Required for Allure report generation).

Installation of the testing framework

Clone the repository:

git clone https://github.com/charlyautomatiza/starter-playwright.git

Install dependencies.

npm install

To run the tests go to the root of the project and run (headless mode)

npm run test

To run the tests go to the root of the project and run (headed mode)

npm run test-head

To run the tests only on Firefox

npm run firefox

To run the tests only on Chromium

npm run chromium

To run the tests only on Webkit

npm run webkit

To run the tests with UI + API Examples

npm run api-ui

To run the tests with UI + API + Mockaroo Examples

npm run data-mgmt

IMPORTANT:

To run your own Mockaroo examples you should create a free account, create a new schema and create a new .env file with your API_KEY

Example .env:

API_KEY=000zz999

For running Accessibility Testing examples with Lighthouse

npm run a11y

IMPORTANT:

In the thresholds section of the a11y.lighthouse.spec.ts file, you can configure the acceptance level of the accessibility, performance, SEO, best-practices, pwa respectively.

If our threshold is 100 for accessibility, our test must have 100% acceptance to be considered successful.

thresholds: {
    performance: 50,
    accessibility: 100,
    'best-practices': 50,
    seo: 50,
    pwa: 0,
},

To open Playwright's unified Html report of test results

npm run play-report

To create and open the Allure unified report of test results

npm run open-report

IMPORTANT

After each upgrade of Playwright, the project must be restarted locally with the command:

npm run reinstall

To download the latest versions of the Browsers.

starter-playwright's People

Contributors

charlyautomatiza avatar dependabot[bot] 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.