Giter VIP home page Giter VIP logo

playwrightframework's Introduction

POC to E2E test with Playwright TS

Tests

Required software

  • Node js -> v.16 or above
  • VS Code
  • Playwright Vs Code Extension (Optional)

Setup Playwright

Clone this repo and execute the next commands

Navigate to the folder and install the NPM packages

npm install

Install Playwright browsers and dependencies

npx playwright install

Add .env file with the next values:

BASE_URL='https://www.saucedemo.com'
USER_NAME=valid user in saucedemo
PASSWORD=password for sauce demo
LOCALE=locale to test. Valid values are: 'en-US', 'de-DE', 'es-MX'
EFFIZIENTE_API_URL='https://effizienteauthdemo.azurewebsites.net'
EFFIZIENTE_URL='https://effizientedemo.azurewebsites.net'
EFFIZIENTE_COMPANY='Demo'
EFFIZIENTE_NORMAL_USER='Demo'
EFFIZIENTE_NORMAL_PASSWORD='Demo'
EFFIZIENTE_ADMIN_USER='Admin'
EFFIZIENTE_ADMIN_PASSWORD='Admin'

LambdaTest

Lambda test allows you to execute your test in different browsers and countries.

To connect to Lambdatest add the next variables

LT_USERNAME = Your lambdatest user name
LT_ACCESS_KEY = Your lambdatest access key

Qase

Qase is a test management tool to execute your manual and automated tests

If you want to connect with QASE a test management tool add the next variables:

QASE_TOKEN= Qase token for playwright
QASE_PROJECT_CODE= Qase project to connect

You can follow the Qase documentation to get these values.

https://docs.qase.io/apps/reporters/playwright

Accessibility tests

It's important and is the law in some countries that your website is accessible to all people

To run accessibility test:

PAGE_URL= Page to test example: "https://www.google.com"
DEBUG_PAUSE=2000 Milliseconds to highlight elements with accessibility issues.

Dashboard and summaries will be stored in test-results folder

ZeroStep

ZeroStep allows you to execute your tests with AI

To check the ZeroStep to execute your test with AI you need to register your account at https://zerostep.com and add your access token:

ZEROSTEP_TOKEN=Your Zero step token

Checkly

Checkly allows you to monitor your test in different countries periodically, for example, every 3 hours and send you alerts if the test fails or is taking more than the expected response time.

This is not the only exists others like PerfAgents

Run your test with Checkly

 npx checkly test --record;

Run tests

Execute the next command to run your tests:

Run tests

npx playwright test

Run the test with UI mode

npx playwright test --ui

Or you can run with the Visual Code Extension

You can see the reporter on the GitHub Pages:

https://apis3445.github.io/PlaywrightFramework/

playwrightframework's People

Contributors

apis3445 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.