Skip to content

neilSoriano/REST-Ecommerce-e2e

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

REST-Ecommerce-e2e

End to End Ecommerce API Test Tested Ecommerce website API calls like creating a product, adding that product, submitting an order and deleting the product at the end. API calls were tested in Postman prior for visual representation for data being parsed into the REST Assured code. Managed project dependencies using Maven and executed testing with TestNG.

Implementing POJO Classes

Using POJO classes in Java allowed for easier usability and readbility of the program.

  • LoginRequest
    • Used for Serialization of request with setting user email and password for authentication upon Login
  • LoginResponse
    • Utilized Deserizalization of response to parse authentication token and user ID to be used for subsequent API calls
  • Orders
    • Necessary for passing in of OrderDetails
  • OrderDetails
    • Necessary for setting required "country" field during checkout and parsing order ID
    • Object should be in form for Orders POJO class to accept

Other Features

  • Building RequestSpecBuilders(), holding authentication token along with base API request specs
  • Using multiPart() method for passing in an image when product is added into the shop
  • JsonPath objects created for quick parsing of strings
  • Serialization and Deserialization