ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - dantswain/mix_eunit: A mix task to execute eunit tests.
A mix task to execute eunit tests. Contribute to dantswain/mix_eunit development by creating an account on GitHub.
Visit Site

GitHub - dantswain/mix_eunit: A mix task to execute eunit tests.

GitHub - dantswain/mix_eunit: A mix task to execute eunit tests.

MixEunit

A mix task to execute eunit tests.

  • Works in umbrella projects.
  • Tests can be in the module or in the test directory.
  • Allows the user to provide a list of patterns for tests to run.

Example

mix eunit # run all the tests
mix eunit --verbose "foo*" "*_test" # verbose run foo*.erl and *_test.erl

Installation

Add to your mix.exs deps:

def deps
  [#... existing deps,
   {:mix_eunit, "~> 0.2"}]
end

Then

mix deps.get
mix deps.compile
mix eunit

To make the eunit task run in the :test environment, add the following to the project section of you mix file:

def project
  [#... existing project settings,
   preferred_cli_env: [eunit: :test]
  ]
end

Command line options:

A list of patterns to match for test files can be supplied:

mix eunit foo* bar*

The runner automatically adds ".erl" to the patterns.

The following command line switch is also available:

  • --verbose, -v - run eunit with the :verbose option
  • --cover, -c - create a coverage report after running the tests
  • --profile, -p - show a list of the 10 slowest tests
  • --start - start applications after compilation
  • --no-color - disable color output
  • --force - force compilation regardless of compilation times
  • --no-compile - do not compile even if files require compilation
  • --no-archives-check - do not check archives
  • --no-deps-check - do not check dependencies
  • --no-elixir-version-check - do not check Elixir version

Project Settings:

The following mix.exs project settings affect the behavior of mix eunit.

def project
  [
    # existing project settings

    # run the `eunit` task in the `:test` environment
    preferred_cli_env: [eunit: :test],

    # set the output directory for `mix eunit --cover` reports
    #   the default is `./cover` (same as `mix test --cover`)
    test_coverage: [output: "_build/#{Mix.env}/cover"]

    # set switches that affect every invocation of the eunit task
    eunit: [
      verbose: false,
      cover: true,
      profile: true,
      start: true,
      color: false
    ]
  ]
end

Cover:

Note that mix eunit --cover and mix test --cover will not in general cover the same source code with tests and therefore will typically generate two independent coverage reports. There may be some overlap if your eunit and ExUnit tests cover some of the same code.

By default, mix eunit --cover produces coverage reports in HTML format in the same cover directory that mix test --cover does. You can override the mix eunit --cover output directory in your mix.exs file as described above.

Test search path:

All ".erl" files in the src and test directories are considered.

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory