Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integration Tests in Elixir - how to filter out from Unit Tests

Tags:

testing

elixir

I want to separate out Integration tests from Unit Tests in Elixir. I found the Elixir mix documentation has a section on filters, and describes just what I want to do.

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

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

Then how does one tag tests as "external"?

like image 772
steve77 Avatar asked Sep 01 '14 23:09

steve77


1 Answers

You just add @tag external: true (or the shortcut @tag :external) before the test definition (you can also use @moduletag to tag a whole test case).

like image 107
José Valim Avatar answered Oct 19 '22 10:10

José Valim