This framework is designed for testing GitHub UI and API using Java, Maven and Selenium
Modules:
- Applications
- Configuration
- Utilities
- Tests
- Rest-Assured - tool for test API requests
- TestNG - tool for add annotations, run, configure tests (run test suit by .xml file)
Contains all classes related with specific app. Class with requests implementations for specified API calls.
Read prepared JSON with baseURL to properties.
Base class with request implementation - build request with provided properties, validate response
Contains Test suits for specified API calls. Copy or modify TestRunner.xml file allows to specify source of data for tests
[IMPORTANT]
Don't commit properties, JSON files filled with data
- Use resources -> properies files to provide server data and necessary data.
example:
resources
└───user
└───user.token.properties
Authorization=Bearer <your_token> <─── paste user token for authorization
- To compare request response data with expected data - use JSON files and load them to required Objects
src
├───main
│ └───java
│ ├───applications ----------------------> Module for each app
│ │ └───github
│ │ ├───api
│ │ │ ├───data
│ │ │ │ └───default_headers
│ │ │ └───user_module
│ │ │ ├───builders ---------> Create object from provided data
│ │ │ ├───constants ---------> Request Path
│ │ │ ├───data ---------> JSON data for testing
│ │ │ │ └───user_data
│ │ │ ├───models ---------> Request body models
│ │ │ └───services ---------> Requests service class
│ │ └───ui
│ ├───config ---------------------------> BaseURL for whole test suite
│ │ └───envs
│ └───utilities -------------------------> Package with class necessary in whole framework
│ ├───common
│ ├───jsonUtils
│ └───requestsUtils ----------------> Base requests class to build request
│ └───builders
└───test
├───java
│ └───applications
│ └───github
│ ├───api
│ │ └───user
│ └───ui
└───resources