Minimal example
  1. Design simple framework messages mapping:
    1. Select Edit > Preferences > General settings > Frameworks.
    2. Create a new framework called: "SimpleDraw".
    3. In the Framework settings section, enable the WebSocket checkbox and click on the wrench-like button to configure it using the following:

      Request ID extraction:

      Regular expression: ^Create\(([^)]*)\)

      Value template: $1$

      Response ID extraction:

      Regular expression: ^Created\([^,]*,([^)]*)\)

      Value template: $1$

      Note: you can use test field to test your regular expression. Click the content link to add a content to match.

  2. Record a new Virtual User.
    1. In the Dynamic Parameters step, keep the option Use Framework rules enabled.
    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, verify the recorded request, the recorded response, and the framework settings.

  3. Set the WebSocket requests in synchronous mode.
    1. Set the “websocket_request” to synchronous mode

    Note: the Mapping ID in the WebSocket request and the message mapping in the WebSocket channel are auto-filled by the ID extracted at the end of the recording thanks to the request ID extractor configured in the Framework settings.

  4. Set the variable extractor for the delete operation.

    If you try to apply a check VU on your scenario, you can see the last response is :"Oops 28262 does not exist". The identifier of the shape has changed, therefore you need to extract the new ID to replay the scenario.

    1. In the Virtual User tree, go to websocket_request.
    2. Click the Advanced button.
    3. In the Advanced panel, select the Variable extractor tab (this tab is only displayed in synchronous mode).
    4. Click the + button.
    5. In the Definition tab, click the button Switch to advanced mode.
    6. Enter the following text:

      Variable name: objectId

      Regular expression to match: Created\(([0-9]*),

      Value template: $1$

    7. Go to the second websocket_request and set Delete(${objectId}) as WebSocket request.
    8. You can retry a Check VU and see the result.