This repository consists of API Automation using Rest Assured, Selenium, TestNG, and Java. I have automated the user creation for Customer and Agent, also some transaction-related operations have been done, ex- Send Money, Agent To Customer Deposit, Money Withdrawal, Customer Payment, etc. Also, assertion and negative test cases have been covered for every test case.
- Clone This project
- open build.gradle file in IntelliJ IDEA
- Type gradle clean test in Terminal and Hit Enter
- Then Hit the following command in terminal
allure generate allure-results --clean -o allure-report
allure serve allure-results
- Java Programming Language
- IntelliJ IDEA
- Selenium Tool
- Rest Assured Library
- TestNG Framework (Page Object Model Architecture)
- Allure for Report Generation
- Gradle Build System
Do the following steps using the API from this collection: https://api.postman.com/collections/1844288-143eb923-423f-4c91-a198-fe6e56d20e35?access_key=PMAT-01GJ3CC22Q0066PJWP3T0XHQ8G
- Do Login by admin
- Create 2 new customers and an agent
- Give 2000 tk from the System account to the newly created agent
- Deposit 1500 tk to a customer from the agent account
- Withdraw 500 tk by the customer to the agent
- Send money 500 tk to another customer
- Payment of 100 tk to a merchant (01686606905) by the recipient customer
- Check the balance of the recipient customer
Hints:
- Keep the baseUrl, partnerKey, and token in config.properties file
- Keep the new customer's and agents' necessary info in a json array file for chaining APIs
- Check that the user can not log in with invalid credentials
- Check that the user can successfully log in with valid credentials
- Check that user1/customer1 creation is not possible with an invalid phone number
- Check that user1/customer1 can be created with valid credentials
- Check that user2/customer2 creation is not possible using an invalid token
- Check that user2/customer2 can be created with valid credentials
- Check that agent can be created with valid credentials
- Check that it is not possible to deposit money from the system account to the agent account with the wrong method
- Check that it is possible to do the successful deposit of money from the system account to the agent account
- Check that it is not possible to deposit money from the agent account to the wrong customer 1 account
- Check that it is possible to successfully deposit money from the agent account to the correct customer 1 account
- Check that it is not possible to withdraw money from customer 1 account to a wrong agent account
- Check that it is possible to successfully withdraw money from customer 1 account to a correct agent account
- Check that it is not possible to send money from customer 1 account to the wrong customer 2 account
- Check that it is possible to successfully send money from customer 1 account to a correct customer 2 account
- Check that it is not possible to do a payment from the customer 2 account to an invalid agent account
- Check that it is possible to do a successful payment from the customer 2 account to a valid agent account
- Check that it is not possible to check customer 2 account balance with the wrong method
- Check that it is possible to successfully check customer 2 account balance with the correct method