Automated testing of gorest.co.in using RestAssured, testNG and cucumber
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 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.
###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/).
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.