Jcambass
What's the state of the art E2E testing mix package for elixir?
Hi there,
I’ve recently added end-to-end testing to my phoenix application. I quickly tried setting up hound but then ended up using wallaby which I’m quite happy with, but it’s still not clear to me which one the better one for the future is.
I found some discussions that hinted at the fact that wallabys development has stopped but it looks like there is some recent activity.
Because of this I wanted to ask the community what their experiences with E2E hex packages for elixir is and what the most future proof library of them is.
Thanks for your answers already!
Marked As Solved
mhanberg
I have never used Hound, so I can’t really comment on the differences in anger. All I know is the API’s for each are pretty different, with Wallaby being more pipeline operator driven.
I have used Cypress and I did not like using it to be honest, but I’ll note my experience was minimal. One key difference is you won’t have access to any of your elixir code when using Cypress, so if you need to seed your database, you’ll need to figure out a way to do that.
Cypress does seem to be backed by a product company (based around Cypress) and seems to have major support in the JS community, so I would expect that it would continue being well supported.
Also Liked
mhanberg
shanesveller
This phrasing kind of hints that maybe your E2E tests are not purist black-box style testing and instead rely on some prior state to be present in the database. If that’s so, I’d suggest re-examining that testing design choice. E2E tests should generally not be aware of or reliant on application internals, just the behavior a user/client can see and interact with directly.
LostKobrakai
While I can understand the notion of E2E being everything running like in production there’s also merit in using those tools “just” to make sure things don’t break in a browser. With wallaby/hound + ecto sandbox you can have isolated tests, where setup is done via plain elixir code, while only the actually subject under tests is dealt with by remote controlling a browser. One can for sure use cypress, but that either means tests depend on state of previous tests, or setup tasks can become expensive as all the setup must be done via the controlled browser. And I question the merit of creating a tenant via the UI over and over again because 97% of tests need a tenant.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









