svilen
Author of Concurrent Data Processing in Elixir
I’m using Hound with ChromeDriver and I’ve read that it is possible to run async tests (e.g. multiple browsers executing the test cases in parallel). However, I can’t find any examples/tutorials how to do this.
There’s a question on StackOverflow that was kind of a starting point, but I was still getting DBConnection.OwnershipError exceptions or other timeout errors. Then I saw this answer in the forum saying that Wallaby/Hound support async tests through a plug found in Ecto.
Could someone provide a short example how to get this working? Thanks a lot in advance!
Elixir 1.4 / Phoenix 1.3rc
Trending in Questions
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
Anyone here using Honeybadger?
My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of
Bandit.HTTPError...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
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
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #elixirconf-us
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 7- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
josevalim
Documented here: GitHub - phoenixframework/phoenix_ecto: Phoenix and Ecto integration with support for concurrent acceptance testing · GitHub
svilen
@josevalim Thanks for the quick response, that was very helpful! I’m surprised Hound’s README doesn’t have a link to it. However, I’m still struggling to get this to work the way I think it should be.
I’ve got two tests, and when ran individually, they take ~15 seconds each (or ~30 seconds with
mix test --only integration). After I addedasync: trueI can see two Chrome browsers starting off, but strangely the total time with the async options and changes is still ~30 seconds, same as before, which seems wrong.How could this be, is there something I’m missing? I followed the guide in the link carefully, and only made 1 change in the
setupof myIntegrationCasefile, due to an error:josevalim
Tests in the same module do not run concurrently. Only tests in separate modules/files. I.e. the granularity of concurrency is per module and not per test. That’s because tests in the same module/file are usually exercising the same area of the codebase and would not benefit of concurrency.
svilen
I see — to clarify, the tests are indeed split in two separate files, and each file has its own module, e.g.:
However, they do exercise the same main web application, just doing different things (one tests logging in, the other tests creating data). Would that mean that I cannot run them concurrently?
tme_317
Hi @svilen,
Wondering if you were able to get Hound to work with an async test suite using ChromeDriver? I’ve struggled for days trying to get this to work before punting and running everything synchronously and was reminded about it this morning: Async Hound tests failing sporadically with ChromeDriver - #2 by myobie
Thanks!
svilen
@tme_317 No, sorry, I had to put this aside and leave them running sequentially.
myobie
I recently used Hound as part of a GenStage pipeline (and spawned about 15 of this particular stage to run concurrently) and this is the code that worked well for me. I think you could create a GenServer and do the same (spawn a process for each test so they are fully isolated).