Skip to content

freestaila/java_restassured_framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

become-qa

This framework is designed for testing GitHub UI and API using Java, Maven and Selenium

Framework structure

Modules:

  1. Applications
  2. Configuration
  3. Utilities
  4. Tests

Used tools

  1. Rest-Assured - tool for test API requests
  2. TestNG - tool for add annotations, run, configure tests (run test suit by .xml file)

1. Applications module

Contains all classes related with specific app. Class with requests implementations for specified API calls.

2. Configuration

Read prepared JSON with baseURL to properties.

3. Utilities

Base class with request implementation - build request with provided properties, validate response

4. Tests

Contains Test suits for specified API calls. Copy or modify TestRunner.xml file allows to specify source of data for tests

5. Test Data

[IMPORTANT]

Don't commit properties, JSON files filled with data

  1. 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 

  1. To compare request response data with expected data - use JSON files and load them to required Objects

Framework tree

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages