axelson

axelson

Scenic Core Team

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

josevalim

Creator of Elixir

You can use the --app in mix cmd: mix cmd --app app1 --app app2 mix test

13
Post #6
vic

vic

Asdf Core Team

@axelson, just did something for you

axelson

axelson

Scenic Core Team

Coming back to this thread rather late :sweat_smile: 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.

lalo2302

lalo2302

You can run specific tests with
mix test path/to/file:line_number
I am not sure if this is what you are looking for.

axelson

axelson

Scenic Core Team

No, that’s not quite what I’m looking for since Mox will still try to run the tests for that path against all umbrella projects.

Where Next?

Popular in Questions Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
mathew4509
I have a list say x = ["23gh", "56kh", "97mh"] I would like to pass each element to Val in each iteration. Say, in iteration 1 -------...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Mooodi
Given a string, how can I get access to its character by index? Enum.at("my_string", 2) doesn't work. Or rather, not char, but a substr...
New

Other popular topics Top

chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New

We're in Beta

About us Mission Statement