Test WebSocket in PlayFramework

前端 未结 4 1679
梦如初夏
梦如初夏 2021-02-20 16:32

I have a WebSocket in my Play application and I want to write a test for it, but I couldn\'t find any example on how to write such a test. I found a discussion in the play-frame

4条回答
  •  没有蜡笔的小新
    2021-02-20 17:04

    I test WebSockets code using Firefox:

    https://github.com/schleichardt/stackoverflow-answers/commit/13d5876791ef409e092e4a097f54247d851e17dc#L8R14

    For Java it works similar replacing 'HTMLUNIT' with 'FIREFOX': http://www.playframework.com/documentation/2.1.x/JavaFunctionalTest

提交回复
热议问题