Thursday, October 31, 2019

Testing the REST POST Method: Pega How-to Guide

To test the POST method, you cannot use the browser. You could use SoapUI or Postman. However, during development, it is still easier to use the OOTB Pega testing tool.


To access the OOTB Pega testing tool, perform the following.

Go back to your “Service REST: DBTestService”, click on the “Actions”, followed by the “Run”, as shown below:

Figure 56: Launching Pega OOTB Service Testing Tool


In the dialog that opened, select “HTTP Method” as “POST”, providing the following sample JSON input:

{
  "name": "Debunkum Beaver"
}

The following is the sample screen. Click “Execute” to run it.

Figure 57: Running Pega OOTB Service Testing Tool


You will now get the following output:

Figure 58: Sample Output from Pega OOTB Service Testing Tool

Well, that is cool, isn’t it?