After having deployed our project, we should have received the REST API Web Service URL to use along with an access token . Such pieces of information can be copied and pasted by clicking on the copy icon. Those are the compulsory data we need to submit in order to call the AI model's Web Service.
A dialog box notifies that they have been generated successfully. Just click on OK and proceed by switching to the Monitor tab from where you can always retrieve it later.
That is it. We have already reached the last stage of our modeling project which is the testing part.
In fact, just like any program , our model needs to be checked in order to evaluate if it duly functions as expected. For the purpose, we are going to use the ‘Postman’ software which is a popular choice among the coders' community.
Let us begin by downloading it from its official link : https://www.getpostman.com/downloads/
To learn how to perform API testing using Postman, check this interesting tutorial .
Complete the installation by following every step. Once the software installed, open Postman 's GUI.
2. Afterwards, click on ‘New collection’ from the collection menu,. Let us for instance name it : SmartPredict_Iris collection. Click on create.
A project folder named “SmartPredict_Iris” has just appeared on the right . Click on the menu (the three dots). A sub-menu spreads out . Click on ‘Add request’.
3. Fulfill the blank fields as described: Set for request name : ‘Test Iris classification ’. Click on the button ‘Save to (the project folder)’. here ‘SmartPredict_Iris’ Get back to the project folder >> Click on it , then on the freshly created Test Iris classification request file.
4. In Postman’s workspace, change GET to POST by selecting it in the drop-down list.
In the Headers part :
Complete the field Key with: Content-Type
Complete the field Value with: application/json
> Notice the tick box being checked
In Body :
Among the radio buttons, choose ‘raw’.
From the drop down list, choose the ‘Json’ format.
Paste the access token copied before into the field intended for it within Postman.
Running the test, we obtain the output ‘Setosa’ for the test set. This means that the model works well.