ExUnit can run tests with different environments / combine umbrella apps in the same report

39 views
Skip to first unread message

Dmitry A.R.

unread,
Dec 16, 2019, 8:19:48 AM12/16/19
to elixir-lang-core
Hi!

The idea is to move this custom testing (https://github.com/elixir-ecto/ecto_sql/blob/master/mix.exs#L105-L123) to a feature of ExUnit. So, that ExUnit can combine 
the running of tests in a groups with different results and report the results in one go.


ExUnit.start(groups: [{"
pg", [env: [{"ECTO_ADAPTER", ...}]]}, {"myxql", [env: [{"ECTO_ADAPTER", ...}]]}])


But as a result, we should see one combined output (how many tests are runned, how many failed) for all environments.

The same would be useful for umbrella apps to be able to run from a single `ExUnit` and see reported for all apps in the end. 
At the moment you see all tests are successful(for last app), but the test run failed, so you need to scroll and find which app exactly is failed.

The ExUnit group functionality should give easiness of configuration/running tests with different environments (as it is oft needed for complex 
applications) and the combined output should help for reporting (generating one report for all test, for example with: https://github.com/victorolinasc/junit-formatter)
even for different environments and different umbrella applications.

I'm available to tackle this, if this would be accepted as feature.

What do you think about this?

Dmitry A.R.

unread,
Dec 16, 2019, 10:36:11 AM12/16/19
to elixir-lang-core
Technically, there can be `Mix.ExUnit` which still separates the running in different processes, like in `ecto`, but accumulates the results.

Does this feature make sense at all or there is a reason, why this shouldn't be provided out of the box??
Reply all
Reply to author
Forward
0 new messages