This is a Selenium-based test automation project using Java, TestNG, and the Page Object Model (POM) design pattern. It automates critical user workflows on Daily Finance App, including registration, password reset, profile updates, adding daily costs, search box, admin verification, and data scraping.
- User registration with dynamic Gmail ID
- Email confirmation via Gmail API
- Password reset with negative and positive test cases
- Login with updated credentials
- Adding cost with all and mandatory fields
- Profile update with email change
- Admin login and verification of updated user
- Registration of users from CSV file
- Web table data scraping and writing to a text file
- All tests follow the POM (Page Object Model) structure
- Java – Programming language
- Selenium WebDriver – For browser automation
- TestNG – Test framework for structuring and executing tests
- Gradle – Project and dependency management
- Apache Commons CSV – For reading user data from CSV files
- REST Assured – For Gmail API integration and email validation
- Allure – For test reporting
- Git & – Version control
Clone the repository
git clone https://.com/ShababAhmedd/Selenium4Finance.git cd Selenium4Finance
Open the project in IntelliJ IDEA or your preferred IDE
- Choose Gradle as the build system
- Choose Groovy as the Gradle DSL
Let Gradle resolve all dependencies
- Dependencies are managed in
build.gradle
- All the necessary dependencies are already downloaded.
- Dependencies are managed in
Required Resource Files Before running the project, create the following files inside
src/test/resources/
:config.properties
– Holds your Gmail API token. Useconfig.sample.properties
as a reference.users.csv
– Stores user data to be registered. Useusers.sample.json
as a template. Update the file with the user data to be registered.localStorage.json
– Used for storing local auth tokens. UselocalStorage.sample.json
as a reference (just create the file empty. The authToken and authTokenData will be written after running the project).
These files are excluded from version control for security. You must create them manually based on the provided samples. These sample files can be found within
sample-resources
which is situated at the root of this project.
Configure Gmail API Token
- Open
src/test/resources/config.properties
- Add your Gmail access token like this:
g_token = your_generated_gmail_token
- Gmail API token must be refreshed manually after expiration.
- Open
To execute the entire regression suite, run:
gradle clean test -PsuiteName="regressionSuite.xml"
To run with admin credentials (securely passed via CLI):
gradle clean test -PsuiteName="regressionSuite.xml" -Pemail="[email protected]" -Ppassword="admin123"
Individual test classes can also be run via CLI or IDE. To execute a specific test class (e.g., ItemTestRunner) directly via CLI:
gradle clean test --tests "testrunner.ItemTestRunner"
- Run your tests using Gradle as usual:
- Generate Allure results: If your project is configured with the Allure plugin, run:
allure generate allure-results --clean -output
- Open the report in your browser:
allure serve allure-results
TestNG_project.mp4
TestNG_project/
├── sample-resources/ # Sample template files (safe to share)
│ ├── config.sample.properties
│ ├── localStorage.sample.json
│ └── users.sample.csv
├── src/
│ └── test/
│ ├── java/
│ │ ├── config/ # Setup, UserModel, RegistrationDataSet
│ │ ├── controller/ # Gmail API controller for email/Snippet
│ │ ├── page/ # Page Object Model (POM) classes
│ │ └── testrunner/ # Test classes for each user/admin flow
| | └── utils/ # Utils
│ └── resources/ # Local resources (config.properties, localStorage.json, users.csv were not pushed to repo)
│ ├── config.properties
│ ├── users.json
| ├── regressionSuite.xml # TestNG suite configuration
│ ├── localStorage.json
| ├── users.csv
│ └── webTable.txt
├── build.gradle # Gradle build configuration
└── README.md