I have a project that consists of an Umbrella App. The child apps under the umbrella consist of a core/main/domain application a delivery app, a database backed repository and an in memory repository.
I would like to write a few integration tests that send http requests and check the changes in the database. As these tests require the coordination of several of the child apps these tests belong in the umbrella app and not in an individual childs test directory.
The default umbrella project does not get created with a test directory so I am unsure where they belong.
I have created a test dir and added a test_helper.exs that calls ExUnit.start
and a project_test.exs test. but when I run mix test from the umbrella directory it only finds test in the apps/component/test directory and not the tests in the test directory
The umbrella project is meant to be an umbrella facility really, you can't add code nor tests to it. I can see two options:
Add the tests to the application that depends on all others (if you have one)
Create another application in apps that is where you will store all integration tests
In any case, remember that ExUnit has the concept of tags and you can tag all integration tests as such and use the tag system to include/exclude tests at will. This should help you manage tests as they grow in number.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With