Advanced example

Let's continue the previous example to check the response deletion.

Here we will use more permissive regular expressions to match the delete request.

Please follow the bellow steps:

  1. In the Virtual User tree, go to websocket_channel.
  2. Click the Advanced button.
  3. In the Advanced panel, select the Messages mapping tab.
  4. Change text as follows:

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

    Value template: $3$

    Information: you can test that the first message returns diamond and the second returns a number.

  5. Go to the second websocket_request_1 and switch it to synchronous.
  6. You can see that Mapping ID is empty. Fill it with ${objectId}.
  7. Click the Validation button and specify to be a success if the duration is shorter than 100 ms.

  8. If you want, you can now delete the end_delay action in the Virtual User tree.
  9. Apply a Check VU on your scenario.

More complex frameworks

On the same idea, you can directly use a more complex framework to match create and delete requests at the same time.