This project aims to provide test automation artifacts in the end-to-end layer using the Type Script language and Playwright, Cucumber framework.
To execute the project you must have:
Using the Page Objects design pattern, which aims to separate elements into different files based on the pages on which they appear. And so, writing all the specific elements and methods of that page in your file, which is a class, and using them directly in the test scripts. We have the following directory structure in the project:
-
features/ - contains
.featurefiles with test scenarios written in Gherkin syntax. -
locators/ - contains the scripts that associate expressions in the step-by-step tests with interactable elements - such as buttons, selectors, checkboxes, text fields, etc. - on the page to be navigated.
-
steps/ - contains the step-by-step execution scripts for the tests described in the .
featurefiles. -
common/ - centralizes files that are common and consumed by everyone in the project.
-
support/ - contains auxiliary files for the project, such as types, global variables, utilities, error handling, etc.
- Clone the repository:
$ git clone git@github.com:Automated-Test-Lab/playwright-typescript-cucumber.git- Install project dependencies:
$ npm install- Install Cucumber:
$ npm install cucumber- Install Playwright:
$ npm init playwright@latest- Install Typescript:
$ npm install -g typescript - Install Allure:
$ npm install -g allure-commandline - Run tests:
$ npm run all- Generate the reports:
$ cd reports
$ allure serveTo contribute to the project, follow these steps:
1. Clone this repositoy
2. Create a branch: git checkout -b <nome_branch>.
3. Make your changes and commit them: git commit -m '<mensagem_commit>'
4. Push to branch: git push origin <nome_branch>
5. Create the merge request.