Framework - maintain all project related files.
-
Re-Usability
-
Maintainability
-
Readability
-
Understanding requirement
- Functional specifications (static)
- Swagger
-
Choose automation tool - Rest Assured Library
-
Design your framework
- Decide about folder structure.
- Decide coding format and other policies.
- Decide Configuration and utility classes.
-
Development
- Develop all decided design
-
Execution + CI
-
Endpoints - Routers, UserEndPoints, StoreEndPoints, PetEndPoints
-
Test Cases - User Tests, Store Tests, Pet Tests
-
Payloads(POJO) - User, Store, Pet
-
Utilities - DataProviders, Extent Report, XL Utility
-
Test Data - Userdata.xlsx, StoreData.xlsx, PetData.xlsx
- TestNG.XML
- POM.xml - Dependencies, Plugins
- Reports - TestNG Reports, Extent Reports
- Git
- GitHub
- Jenkins
==========================================================
Step 1: Create Maven Project
Step 2: Update pom.xml with required dependencies
Step 3: Basic structure we need to create - Create folder Structure
Step 4: Create Endpoints.java which contain's url
Step 5: Create UserEndPoint.java =====> CRUD method implementation
Step 6: Create UserServiceHelper and read config files and creating reusable https methods.
Step 7: Create Data driven test - need data in excel sheet - need apache poi to read and write data - excelUtility file
Step 8: Generate extent reports - extent report utility. - testng.xml file
Step 9: Add execution logs to track log of execution. Add logs - log4j2 dependancy,
Step 10: How to get url from properties file and run it - checkout classes UserServiceHelperFromProperties, endpoints.properties, com.api.test.property.UserTests.java
Step 11: How to run project through Maven - Add two plugins in to pom.xml - maven-compiler-plugin and maven-surefire-plugin and add target testng.xml
Step 12: Command for run - mvn clean install test
Step 13: Run project from command prompt/terminal: Install maven in your system. - set maven path - go to project location in terminal and run mvn clean install test