Giter Site home page Giter Site logo

playwright-serenity-automation-framework's Introduction

Playwright SerenityJS Automation Framework

Technologies Used

Playwright and SerenityJs is a powerful combination of technologies for web application testing. It provides reliable and maintainable automated testing with Playwright for browser automation and SerenityJs for testing framework.

Screenplay Pattern

Installation

To get started with this project, you'll need to have Node.js and Git installed on your machine.

First, clone the repository:

git clone https://github.com/username/playwright-project.git

Once you have cloned the repository, navigate to the project directory:

cd playwright-project

Then, install the project dependencies using npm:

npm install

Project overview

hbautomationOverview

Run, the following command to set some depencies needed after install like rimraf is a Node.js package that provides a cross-platform command line interface (CLI) for deleting files and directories.

npm run postinstall

Running Tests

To run all tests and open serenity report

npm run test

At the end, will be generated a serenity report like this

serenityReport

To run all tests without open serenity test:execute

npm run test:execute

To open serenity report

npm run test:report

To clean old serenity reports

npm run clean

Note If you are using npm run test:execute or npm run test, this command is not required.

To run test cases by tags

npx playwright test -g "@hb-0001"

Tags that you can use

๐Ÿ“˜ Test Case ๐Ÿ“— Story ๐Ÿ““ Others
1๏ธโƒฃ @hb-0002 ๐Ÿ“— @hb-0001 ๐ŸŒ€ @regression
1๏ธโƒฃ @hb-0003 ๐Ÿ“— @hb-0005
1๏ธโƒฃ @hb-0004 ๐Ÿ“— @hb-0008
2๏ธโƒฃ @hb-0006
2๏ธโƒฃ @hb-0007
3๏ธโƒฃ @hb-0009
3๏ธโƒฃ @hb-0010
3๏ธโƒฃ @hb-0011
3๏ธโƒฃ @hb-0012
3๏ธโƒฃ @hb-0013

Jenkins Pipeline

pipeline {
    agent any

    tools {
        nodejs 'NodeJS 17.5.0'
    }
    stages {
        stage('Dependencies') {
            steps {
                bat 'npm ci'
                bat 'npm install rimraf'
            }
        }
        stage('e2e Tests') {
            steps {
                bat 'npm run test:execute'
            }
        }
        stage('Deploy Test Reports') {
            steps {
                publishHTML([
                  allowMissing: false,
                  alwaysLinkToLastBuild: true,
                  keepAll: false,
                  reportDir: 'target/site/serenity',
                  reportFiles: 'index.html',
                  reportName: 'Serenity Report',
                  reportTitles: '',
                  useWrapperFileDirectly: true])
            }
        }
    }
}

Pipeline in Jenkins

image

playwright-serenity-automation-framework's People

Contributors

diegocortes15 avatar

Stargazers

 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.