+

Search Tips   |   Advanced Search


Design a VU containing WebSocket synchronous requests

  1. Define the framework WebSocket messages mapping

    1. Select Edit > Preferences > General settings > Frameworks.
    2. Create a new framework or select an existing one.
    3. In the Frameworks settings section, enable the WebSocket checkbox and click on the wrench-like button to configure it.
    4. Specify the XPath or regular expression to extract the mapping ID from the WebSocket request.
    5. Specify the XPath or regular expression to extract the mapping ID from the WebSocket response
    6. Expressions can be tested with the Test section:

      • Click on content.
      • Paste the content of a request.
      • Check the extracted value.
  2. 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).

    1. In the Dynamic Parameters step, keep the option Use Framework rules checked.
    2. 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.
  3. Set the WebSocket requests in synchronous mode.

    1. Locate in the Virtual User tree the WebSocket requests on which you want to apply validation, variable extraction, or having response time in results.
    2. Set them as synchronous mode: the request execution will be blocked until the response is received on the WebSocket channel.
    3. 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