Povio Assignment - Automated QA
- Node.js (version 16 or higher)
- npm (usually comes with Node.js)
- Playwright (will be installed via
npm install
)
- Clone the repository.
- Run
npm install
. - Create a
.env
file in the root directory. - Copy the contents of
.env.example
into.env
and replace the placeholder values with your actual credentials. - Run the project locally.
The following environment variables are required in the .env
file:
SIGNIN_USERNAME
: Your sign-in username.SIGNIN_PASSWORD
: Your sign-in password.
Example .env
file:
SIGNIN_USERNAME=your_username@example.com
SIGNIN_PASSWORD=your_password
- Run tests in UI mode:
npx playwright test --ui
. - Run all tests using terminal:
npx playwright test
.
- report open in browser after fail on each run.
- for successful run report, execute in terminal:
npx playwright show-report
.
- Run a folder of tests:
npx playwright test ${folderName}
.
- example:
npx playwright test signed-in
.
- Run a single test:
npx playwright test tests/${nameOfTest}
.
- example
npx playwright test tests/home-page-spec.ts
.
- Run all on chrome (logged in tests excluded):
npm run test chrome
. - Run all on firefox (logged in tests excluded):
npm run test firefox
. - Run all on safari (logged in tests excluded):
npm run test safari
. - Run logged in tests (chrome):
npm run test test:loggedIn:chrome
. - Run tests in headed mode
npx playwright test --headed
.
To run tests in a CI/CD pipeline, add the following secrets to your GitHub repository:
- `SIGNIN_USERNAME`
- `SIGNIN_PASSWORD`
Artifacts are available in CI/CD under each run.