包详细信息

playwright-cucumber-integration

moxetibane55ISC0.1.38

E2E Web and API Automation Using Playwright and Typescript

[By Moxe Tibane and Ronald Ncube]

<h3 al

自述文件

E2E Web and API Automation Using Playwright and Typescript

[By Moxe Tibane and Ronald Ncube]

Welcome to the All-In-One next generation of UI Automation

The benefits of this framework include


🏆 In-built Cucumber Integration

🏆 In-built Azure Test Plans Integration

🏆 In-built Azure Pipelines

🏆In-built Azure Test Coverage and Execution Dashboard

🏆 In-built Cucumber Report

Table of contents


Pre-requisites

Setup

Executing Tests

Additional Info

Pre-requisites to running playwright


Before you can run with Playwright, you will need the following installed in your machine

  • A code editor of your choice
  • Most Engineers use VS Code VS Code

  • Node JS (At least version 14.17.0)
  • To check if node is install run the command: node -v

    If node is installed in your machine, your will get the following:

    node versio installation

    Else install Node from the following link NodeJs

    Setup


  • Clone this repo to the location of your choice
  • Create a file called .env.secrets in the root of the project.
  • Create a file called .env.secrets in the root of the project.
  • Generate a PAT file in Azure. Steps to generate a PAT File

    Update your .env.secrets with your PAT file as follows

    PAT=[Your base 64 PAT token here]

  • Add your test credentials to the .env.secrets as follows
  • TEST_GENERIC_USERNAME=[Your username here]

    TEST_GENERIC_PASSWORD=[Your password here]

    Executing your test scripts


    Since the test are written in Cucumber, we need a test runneer that can interpret the tests.

    The test runner that is used in this framework is CucummberJs which is fairly easy to use>

    To run the tests, you simply need to:

    1. Open your code editor's terminal from the root of your project
    2. Run the command: npm install and wait for the installation
    3. Now it is time to run the tests. Simply run the command: npm run test:chrome:stg "@SampleTests"

    Additional Info


    If you have any issues following this guide, please reach out to Moxe Tibane or Ronald Ncube on Teams; they will definitely sort you out.

    Happy Testing &#128516


    Copyright reserved &copy 2023