Elixir Integration Tests - How to Filter Unit Tests

I want to separate integration tests from Unit Tests in Elixir. I found that the Elixir mixing documentation contains a section on filters and describes only what I want to do.

Then add the lines below to appdir / test / test_helper.exs

# Exclude all external tests from running ExUnit.configure exclude: [external: true] 

Then how is one tag checked as "external"?

+6
source share
1 answer

You simply add @tag external: true (or the @tag :external shortcut) before defining the test (you can also use @moduletag to mark the entire test case).

+10
source

Source: https://habr.com/ru/post/974665/


All Articles