Framework- RestAssured API - Layers/Components

 FrameWork - High Level Design Pattern +Hybrid DD - RestAssured API






RestClients.java - > Custom utility ,We have generic Methods 

Rest Specifications and CRUD methods

GET().PUT().POST().DELETE(),PATCH() - returnds Response

Wrapper method we create top of RestAssured 

Reusability we have methods 


Cofig.properties

baseUrl,clientId,ClientSecret,APIKEY,Bearer TOKEN,USerName,Password,Token


TestLayer - TestNG

TestCases:

Classes with TestNg layer ->assertions,@BeforeTest,@Test


BaseTest.Java with @Before,@After

Utility:UTIL

JsonPathUtil.java -->methods with getJsonnValue(path)--give the value

xmlPathutil.java

ObjectMapperUtil.java -->Deserialzation

ExelUtil.java

CSVUtil.java

StringUtils.java--String Manupulation


POJO

UserPojo.java using lombok

productsPojo.java using lombok


TestRunners

test_sanity.xml

test_regression.xml

<test> blocks

Avoid parrel execution ->api is so fast we dont need parallel run

Pom.xml- Maven

dependency

plugins:compiler

surefire-run tests

deploy:Nexus

assembly:fat jar


src/test/resources

.json

.xml

.test

.html

.xls/.csv

json scheme


APIConstant.java

constants.java

Error.java

FrameworkException.java

Enums-->collection of constants -ContenetType- xml,json,AuthType-oauth1, oauth2

Reports

allureReport- add depenecy it will give report

testNG html

extend

Allure


Once all componets are there we will push to GITReport 

GITRepo -  

Master +Feature


WebHook - 

feature of GIT -> 3rd pary server NGROG proxy.

NgROK proxy is integrated with Jenkin, is mediator between GIT REPO and Jenkins

when we push code to master , event will trigger to NgROK proxy and job will run automatically


CICD- Jenkin- workspace

jenkin will maintain WS

push code to gitRepo->trigger the pipeline-->Maven test 

-createJob

-Pipeline:CICD/BO

-Parameterize

-Scheduling

-Jenkinfile->DeclarativePL synax

Trigger the TestCases


Docker :

dockerfile, steps

Deploy in DockerHUB

DockerHub/Registry


NexusServer- artifact management tool -project will FAT Jar

deploy the job

create the jar-->depencyAssembly will create FAT Jar, pom.xml


===========================================================

Folder Structure

C:\Users\windo\eclipse-workspace\July2024APIFWSeries>tree










Comments

Popular posts from this blog

Implicit and Explicit Waits,FluentWait,PageLoadTimeOut

A Interview Questions- selenium