I’m building a test to confirm that each HTTP API call generates a WebSocket message, and would like to set up a threshold that the number of WebSocket messages received is the same as the number of HTTP API calls I’ve made.
Example:
const expectedMessages = new Counter('ws_messages_expected');
const receivedMessages = new Counter('ws_messages_received');
export const options = {
thresholds: {
'ws_messages_received': ['count==ws_messages_expected.count']
}
}
Is this possible in k6? If so how? If not, are there other ways to accomplish this?