Skip to content

REST API Automation Testing using REST Assured, jsonschema2pojo, Cucumber, Jackson and Maven

Notifications You must be signed in to change notification settings

jay4kelly/RESTAPITesting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST API Automation Testing

Automated testing of gorest.co.in using RestAssured, testNG and cucumber

Objective

Demonstrate use of the following testing technologies and procedures as part of providing a complete testing framework.

  • RestAssured (REST API invocation and testing)
  • TestNG (Assertions)
  • Cucumber (BBD test case)
  • Maven Multiple Modules
  • Generate JSON REST POJO content automatically using jsonschema2pojo-maven-plugin
  • Log4J2 (logging)

gorest.co.in site tested

[gorest web site](https://gorest.co.in) is a "Online REST API for Testing and Prototyping". An account and a token must be generated to use this site but it is free to use.

Module Definitions

###RestContent Module

Creates POJO objects from json schema.  Json schema was generated by taking the REST API response and using [Liquid's schema generator](https://www.liquid-technologies.com/online-json-to-schema-converter)  to generate a json schema.
POJO is then packaged as a jar and made a depencency of the RestTests module.
Approach allows the POJO inputs for the REST APIs tested to be generated automatically.
Ideally a json schema could be define to fully cover all POJO needs.
Another option that would be more complete but require more work, would be to generaete the POJO using [jsonschema2pojo generator] (http://www.jsonschema2pojo.org/).

RestTests Module

Contains all of the REST API tests utlizing RestAssured, TestNG and Cucumber.

APIs tested
- Get User
- Delete User
- Create User
- Get User List

APIs tests planned
- Create Comment
- Delete Comment
- Get Comment List

Note: This is just a subset of all the gorest apis, for example, posts and albumns are not included.

TODOs

About

REST API Automation Testing using REST Assured, jsonschema2pojo, Cucumber, Jackson and Maven

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published