Can I use websockets as a test runner type mechanism to run acceptence tests on a single page ajax application. I thought it might work by loading up the single app page and then having another page already loaded both of which are connected using websockets. When the ajax app is loaded it notifies the other page and then the other page starts running the tests using normal js to trigger functions/events and such in the ajax app. This seems like a easier solution then selenium and means I could potentially use any test runner I need.
- Is this possible?
- are there any frameworks currently doing this?
Websockets is not necessary to communicate between two client-side pages, even if they’re on different domains.
window.postMessageis a better choice for that.