axelson
Is it possible to run mix test for only one application in an umbrella?
From the root of the umbrella application I would like to run mix test but have it only load and run code from a single application, but I have been unable to figure out how. I know that I can cd apps/specific_app; mix test I believe that approach will be less scalable. The reason I want to do this is so that when I am in my editor and running the tests for a specific file, I do not want the output the attempts to run the same test file in all of the other applications.
Most Liked
josevalim
You can use the --app in mix cmd: mix cmd --app app1 --app app2 mix test
axelson
Coming back to this thread rather late
but I ran into the same issue today and came across my post in a search.
While this is very useful it still runs the test in that applications directory whereas I want the same behavior of mix test when run from the umbrella root which loads the entire project, this is needed in my umbrella application because the configuration is shared for every app in the umbrella, and the configuration references modules from various applications which causes tests to fail if run from that applications folder.
Since this relies on cding into each application folder it suffers from the same issue.
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









