Server hooks
Server hooks, what are they? How to implement them ?
Hypertest provides server hooks to intercept incoming server requests and their responses. This is valuable when your requests and responses are encoded or encrypted. You can intercept your requests and responses via the hooks and write the decoding/decryption logic in the hooks
How to implement ?
Http
Hypertest provides hooks for http request and response. There are two hooks each for both of them. A hook that runs in record mode and one that runs in replay mode.
Http request, record and replay hooks
An http request hook in record mode would usually deal with decrypting your http request and an http request hook in replay mode would be responsible to do the exact opposite of record mode hook (i.e encrypt or encode the request for your controller to consume)
Http response, record and replay hooks
The purpose of a response hook in record and replay modes is to decode/decrypt the http response for hypertest.
UserMeta
You can add any key value pairs in user meta. Its purpose is to facilitate you in marking certain requests. You can add a key value pair in record mode, and that would be given to you in the subsequent replay mode hooks. Then you can use the key value pairs present to take necessary actions.
Last updated