Highlighted
Valued Contributor.
Valued Contributor.
266 views

LR 12.53 | Web Sockets

I am working on an application where a websocket call is made. I have few queries regarding this.

web_url("websocket",
"URL=http://xxx.xxx.xxx.xx:xxxx/xxxxxxx-xxxxxx/app/webSocketEndPoint/992/8lud3xbh/websocket",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t213.inf",
"Mode=HTTP",
LAST);

1. Two parameters in URL (992 & 8lud3xbh) are dynamic. How to handle them?
2. Header of same request contains 'Sec-WebSocket-Key'. Can we use same value as recording for replay? If not, how to handle it?
3. I have added all required headers along with 'Sec-WebSocket-Key' having same value as recording. I received 'HTTP/1.1 101 Switching Protocols' as response, but when I see page view it shows error message.
4. When I see snapshot of this particular request, I can see two paths during recording both of webSocketEndPoint. But during replay, I can see only 1 path with status 'HTTP/1.1 101 Switching Protocols' as mentioned in point 3.


Regards,
Sharad

0 Likes
3 Replies
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: LR 12.53 | Web Sockets

Hi Sharad, 

maybe I can help you with your first question about parametrization on URL: for the first dynamic argument (in your example, 992) you can create a new Parameter with Type "Random Number" in which there's the possibility to choose the random range; for the second arguments (8lud3xbh) I suggest you to create a ".dat" file that contains a list of all possible values for this string and create a "File" type Parameter, after you can decide the recover algorithm for every record (Random, Unique, Sequential). 

Let me know if this suggestion has helped you with this matter, 

Lorenzo

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: LR 12.53 | Web Sockets

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: LR 12.53 | Web Sockets

1: Depends on the source of those parameters. You might generate them or capture them as a parameter with one of the web_reg_save-* functions.

3: You might capture the header value and make it into a parameter.

4: Might due to error of point 3.

First time working on Web protocol? Try to read some documentation about correlation.

Signature:
Reward community members who take time to respond and help.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.