Design a VU containing WebSocket synchronous requests
- Define the framework WebSocket messages mapping
- Select Edit > Preferences > General settings > Frameworks.
- Create a new framework or select an existing one.
- In the Frameworks settings section, enable the WebSocket checkbox and click on the wrench-like button to configure it.
- Specify the XPath or regular expression to extract the mapping ID from the WebSocket request.
- Specify the XPath or regular expression to extract the mapping ID from the WebSocket response
- Expressions can be tested with the Test section:
- Click on content.
- Paste the content of a request.
- Check the extracted value.
- Record a new Virtual User, at the end, the Post-Recording wizard is displayed (or manually start the Post-Recording wizard on an existing Virtual User with the right-click menu option Search for Dynamic Parameters).
- In the Dynamic Parameters step, keep the option Use Framework rules checked.
- In the next step of the wizard, select the framework rule you want to apply. If no framework rule has been detected for WebSocket messages mapping, check the recorded request, the recorded response, and the framework settings.
- Set the WebSocket requests in synchronous mode.
- Locate in the Virtual User tree the WebSocket requests on which you want to apply validation, variable extraction, or having response time in results.
- Set them as synchronous mode: the request execution will be blocked until the response is received on the WebSocket channel.
- If the request has a response but should not block the script execution, insert the WebSocket synchronous request in a fork logical action container.
Home