Pages

Wednesday, September 16, 2020

Smart way of Testing

Hey Folks,

Time to come up with some smart tools, which make your life easier.


1. To find the xpath from xml file : 
xpather.com 

2. To find the WSDL APIs: 
Install Google Chrome extension - wsdler

3. To test mobile app on emulator:
Install Google Chrome extension - Android online emulator

4. To do browser and excel automation without investing much time on commercial or freeware tool
Install Google Chrome extension - iMacros

Cheers,
TJ

Rest Assured Automation - API

Hello All,

 

Try to put some information around Rest Assured API testing using eClipse, TestNG. in subsequent blog, will provide some technical view.

 

API testing using RestAssured

  • RestAssured itself is API designed for automating Rest services/ Rest APIs.
  • Implemented using java classes
  • Available in jar files
  • Multiple request, get response from apis, validate data etc
  • Restassured only support Rest services, it not support SOAP services 

Setting up

  • Java
  • Eclipse
  • Test NG
  • Maven (specify dependencies)  

Steps:

  1. Create Maven project in eclipse
  2. Need to update POM.xml file
    1. RestAssured (https://mvnrepository.com/artifact/io.rest-assured/rest-assured/4.3.1)
    2. TestNG (https://mvnrepository.com/artifact/org.testng/testng/7.3.0)
    3. JSON – simple (https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple/1.1.1)
    4. Apache poi (https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml/4.1.2https://mvnrepository.com/artifact/org.apache.poi/poi/4.1.2)

 

Validations:

Status Code

Status Line

Request body n parameters

Success code

Validate Header

Json contains

Print headers

 

Data driven testing

1 prepare test data in excel

2 add apache poi dependency in pom.xml  or download apache poi & attach jars to your build path

3 XL utility file(java class file) which will read data from excel

4 write TestNG with data provider method

Cheers,

TJ