[TOC]
The goal for this exercise is to create an end-to-end Proof-of-Concept for a products API, which will aggregate product data from multiple sources and return it as JSON to the caller
Build an application that performs the following actions:
· Responds to an HTTP GET request at /products/{id} and delivers product data as JSON (where {id} will be a number.
· Accepts an HTTP PUT request at the same path (/products/{id}), containing a JSON request body similar to the GET response, and updates the product’s price in the data store.
ABAP stack is used to complete this task. ABAP trail instance is available for developers.
Bonsai is used as NoSQL DB.
Postman is used for testing the API.
Instances of below two Services are required. Please set up and have the service key available for later use.
Go to highlighted Service and create a service Instance and choose plant - apiaccess. Create a Service Key.
This repository can be cloned using abapGit to your package.
After the pull request, if you see any errors please follow the below sequence in activating the pulled repo objects.
If you are already on the same instance and cannot be cloned, please proceed to next step.
Since We need to test both GET and PUT calls , installing latest version of postman will be helpful before beginning the setup.
After setting up postman, import below files.
postman/Assessment Enironment template.postman_environment.json
postman/Target Case Study.postman_collection.json
After importing the Environment template, please set the variable as per below.
Make sure to choose this Environment before proceeding to next step.
After above setup is complete, final step is to generate an AUTH token to be able to start testing.
Follow highlighted steps from Screen shots below to generate an access token and set it up for use.
Test scenarios are already part of the collection shared.
Please run the folder 'Unit Test'
TEST RESULTS: