lensesio / cypress-websocket-testing

Test WebSocket connections with Cypress
Apache License 2.0
83 stars 12 forks source link

Question About Purpose #5

Closed theAndrewCline closed 4 years ago

theAndrewCline commented 4 years ago

So it seems like the target of this project is to allow cypress to send web socket messages to a server. it is not to mock out the rxjs webSocket function and simulate messages being sent to it.

dsebastian commented 4 years ago

Hi Andrew, the purpose is to be able to test/call your server endpoints using Cypress, not to mock them. Think of it as a cy.request, but for WS calls.

You can read a bit more on this here: https://medium.com/@SebDragomir/testing-websocket-connections-with-cypress-2100ab369945

theAndrewCline commented 4 years ago

Thanks for the clarification! I'm really looking for a way to mock out a web socket server endpoint.