-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
websocket testing #26190
Comments
Hi. My understanding of that part of the docs is that you can use Cypress to test applications using websockets in a seamless manner. When testing applications using websockets, the general strategy is either test against the result of the websocket call (eg, did something change on the page) or if you need fine grained control, either
In general, Cypress assumes you control the application you are testing. If you can explain your use case, I can make some recommendations. I will double check if this should be working, but my understand is it you won't be able to listen in for the websocket stream using |
|
I don't think we support intercepting ws yet - just http requests.
If you just need to watch a third party web socket, and not make any assertions against the actual page or even use a web browser, perhaps a simple script using something like Node.js or Python would be a better option? We generally don't recommending testing third parties, unless the behavior is essential to your app, in which case we'd generally recommend asserting the impact of the web socket on your page. |
Unfortunately we have to close this issue due to inactivity. Please comment if there is new information to provide concerning the original issue and we can reopen. |
Current behavior
cypress is not working with websocket
![image](https://user-images.githubusercontent.com/108190964/227140113-dc97d468-dfc8-4a0d-a561-e5e9b7523352.png)
Desired behavior
cypress to work with that or update your documentation here
https://docs.cypress.io/faq/questions/general-questions-faq#We-use-WebSockets-will-Cypress-work-with-that
Test code to reproduce
Cypress Version
12.8.1
Node version
v16.15.1
Operating System
Windows 10 Pro Version 10.0.19044 Build 19044
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: