This repository contains Playwright Automation Tests for the Daily Finance website. The goal is to automate key user flows, including registration, login, item management, profile updates, and password reset.
Before running the tests, ensure you have the following installed:
- Node.js: LTS version (recommended)
- npm: Node Package Manager (comes with Node.js)
- Web Browsers: Chromium (automatically installed by Playwright)
- Java JRE/JDK: Required for Allure Report generation.
-
Clone the repository:
git clone <repository_url> cd <repository_name>
-
Install project dependencies:
npm install
This will install Playwright, Faker.js, dotenv, allure-playwright, and any other packages listed in
package.json
. -
Environment Variables: Create a
.env
file in the root of your project and add necessary variables, such as:# .env email_prefix = your email prefix # Add your Gmail API access token here for email testing (if applicable) access_token = YOUR_GMAIL_API_ACCESS_TOKEN
Make sure to add
.env
to your.gitignore
file to prevent it from being committed. -
Create a dummy image file: For the profile photo upload test, please create a small
.png
or.jpg
file (e.g., a 100x100 pixel image) and save it astest-image.png
in the root of your project directory.
To execute the automation suite, follow these steps:
-
Run all tests:
npx playwright test
-
Run tests in headed mode (browser visible):
npx playwright test --headed
-
Run a specific test file:
npx playwright test tests/testrunner.spec.js
Mahbubur Rahman