Skip to content

Server Sent Events testing #2698

@vs-dsva

Description

@vs-dsva

Server Sent Events (SSE) are quite ubiquitous nowadays but I cannot really test them with Karate when the response of a call is an SSE response.

sequenceDiagram
    client->>server: GET /notifications
    server-->>client: 200 OK + SSE stream payload
    server-->>client: SSE stream payload
Loading

So in order to test I would need either:

  1. A way to create assertions of the stream (stream contains data)
  2. A way to wait cancel the stream and transform the capture in JSON and then perform the assertion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions