API(Soap/Rest)

There are two types of  web services or APIs:
1. SOAP based
2. REST based
 
4. The most common API status/response codes
5. Rest Assured in Java (GET) : On this page, you can find java code for below Get Methods:
1. Simple Get API request
2. Get request with Parameter
6. Get API with two parameters 
3. Get API with header
4. Get API with Basic authentication 
5. Get API with Digest Authentication 
7. Get API with Token(Generate and Use Token)
8. Get API with Preemptive authentication   
 
6. Rest Assured in Java (POST)  : On this page, you can find java code for below Post Methods:
1. Post with HashMap
2. Post without Hashmap 
3. Post with Json String 
4. post with Json Object 

 
Some common Tools/Technologies for testing Web Services:
SOAP UI – supports both SOAP API and REST API
POSTMAN – only for REST
HTTP Client (JAVA API) –only REST
REST Assured(Java API) – only REST
SOAP Client (JAVA API) – only SOAP
JMETER – Performance testing tool --- can be used for REST API
 

SOAP based web service (in Soup UI)   > SOAP WebServices with SOAP UI
REST based web service (in Soap UI)   > REST API with SOAP UI
 
Tools: Soap UI, Postman, Bruno, Swagger, Insomnia, Jmeter

HTTP Requests in API testing,
there are four main requests in API testing:
Get:
Read the data.
Post:
Create the data.
Put:
Update the data. This will update the entire data set such as updating an entire row of a database table. If the resource is not present then it will create the resource.
Patch:
Update partial data. Such as a field in a row.
Delete:
Delete the data

2 comments:

  1. This is really nice post, I found and love this content also visit Serp Api. Thanks for sharing.

    ReplyDelete