Cookie Based Authentication
vREST fully supports cookie based authentication. As vREST test runner executes test cases on client's browser, cookie information is simply stored by your browser and will be used automatically in subsequent test cases. vrest-ng-cli also works in the same way. To use cookie based authentication, simply follow the steps below:
- First create a test case to login into test application. As a result, your test application will send a response header "Set-Cookie". Your browser will store that cookie information automatically.
- Now start validating your APIs. Cookie will be automatically send by your browser in the subsequent test cases. You don't have to provide any cookie related information in the subsequent test cases. An example scenario is shown below for reference.