GithubHelp home page GithubHelp logo

Improving tests about javaphoenixchannels HOT 4 OPEN

eoinsha avatar eoinsha commented on August 15, 2024
Improving tests

from javaphoenixchannels.

Comments (4)

virtualandy avatar virtualandy commented on August 15, 2024

In an ideal world with lots of time, do both, haha.

Looks like maybe mockwebserver from okhttp can mock out websockets. But I wasn't sure if this library only speaks to Phoenix channels (I'm ignorant as to how those differ from say a Node/Socket.io websocket) or not.

I think it would be a win to have a simple Phoenix app and have a test that happens at an "integration" level. In our current case we go through that process of testing web socket connections manually with the server team. So I'm not sure we'd ever run that in an automated suite, but it makes it nice to just roll over to a test and hit "Run" from within Android Studio.

from javaphoenixchannels.

taig avatar taig commented on August 15, 2024

I went with the first option when I was facing the same issue in Scala land. Since the protocol wasn't really specified anyway, I decided to use an echo app to discover and test it, bundled it together in a Docker image and use that to test locally and on CircleCI.

from javaphoenixchannels.

bryanjos avatar bryanjos commented on August 15, 2024

@virtualandy I saw that as well. That might be the way to go. Phoenix Channels are just a protocol on top of websockets (or other transports) So mockwebserver and its websocket mocking would work here.

@taig that's a great idea! Maybe something to look into if we set up some integration testing and CI here.

from javaphoenixchannels.

taig avatar taig commented on August 15, 2024

@bryanjos Feel free to have a look at my Docker/CircleCI configuration: https://github.com/taig/akka-http-phoenix

from javaphoenixchannels.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.