Start by reviewing the DevTest documentation on creating R/R pairs found here.
Naming standards are important as the recorder expects some specific file naming constructs.
Request/Response Pairs - DevTest Solutions - 10.0 - CA Technologies Documentation
Examples are provided in the LISA_HOME\Projects folder.
Each of the REST methods generally follows the same pattern. Requests for example, look like this:
PUT /rest-example/control/users/save
Content-Type: application/json
<other request meta data headers>
<intentional blank line here>
{
"user":{
"emailAddress":"test@test.com",
"firstName":"first-9",
"lastName":"last-9",
"password":"aaaaaaaa",
"username":"dmxxx-009"
}
}
Or for requests having no input body, but perhaps there are query string parameters...
GET /rest-example/control/users/save?userId=abcd
<meta data headers here>
Responses contain the response output associated with the response that corresponds to the request.
{
"USER": {
"emailAddress": "lisa.simpson@itko.com",
"firstName": "lisa",
"lastName": "simpson",
"password": "60fAFoq+W0R4HrLgsfPodkWRw9I=",
"phoneNumber": "",
"username": "lisa_simpson"
}
}
If you need to add MetaData to the response, provide that information in a sidecar file -- see documentation link above. An example of sidecar information might be:
HTTP-Response-Code-Text=OK
HTTP-Response-Code=200
Content-Type=application/json
transactionId=ab3CDE226fgh35IJ
otherHeader=otherHeaderInformation
Your file names will following the construct of:
Request = <filename>-req.txt
Response = <filename>-rsp.txt
Sidecar = <filename>-rsp-meta.properties
where <filename>, above, is the same for all three files so the recorder can determine which request pairs off with which response.