When using the HTTP/HTML Request step or REST step to access the URL which includes Cookie(s), we sometimes see the properties like LISA_COOKIE_<Server Name>/<Path Value>/<Cookie Name> after running the test case like below.
How do the HTTP/HTML Request and REST Step create LISA_COOKIE_<Server Name>/<Path Value>/<Cookie Name> Property? Any Rules?
The HTTP/HTML Request step and REST step use the validation named "Apache HttpClient code for cookie validation" to validate the Cookie information from the Response of the Server.
Here is an example about this validation rule, if these steps send a request to the URL like
http://<Server Name>:<Port Number>/<Path Value>/index.html
then the validation rule checks these below:
If these check points are OK, then the property named LISA_COOKIE_<Server Name>/<Path Value>/<Cookie Name> is created and the value is
[version: 0][name: <Cookie Name>][value: <Cookie Value>][domain: <Server Name>][path: <Path Value>][expiry: null]
(Caution:If the Path is "/" or the Path is not defined, then the property name becomes LISA_COOKIE_<Server Name>/<Cookie Name>.)
If one of these check points is not validĀ or both are not valid, then the property named LISA_COOKIE_<Server Name>/<Path Value>/<Cookie Name> or LISA_COOKIE_<Server Name>/<Cookie Name> is not created.
We can not check the result of the "Apache HttpClient code for cookie validation" for the default log setting.
To see the checks in the log file, please do the following steps:
If the result of checkĀ is invalid, then you can see a warning message like below:
2017-06-02 00:52:04,594Z (09:52) [ProcDlgThreadCallbk@fabce31] WARN org.apache.http.client.protocol.ResponseProcessCookies - Cookie rejected [TUSERID="123457", version:0, domain:myhost, path:/mypath/, expiry:null] Illegal path attribute "/mypath/". Path of origin: "/index.html"
in the workstation.log file.