Elixir Testing — How to run Only Specific Tests.

Malreddy Ankanna
blackode
Published in
6 min readApr 15, 2017

--

Stop coding if you are not writing the test cases.

Google image search Testing…

This article comprises three major topics.

  1. How to run the specific test cases?
  2. How to use tags in test cases? and
  3. How to configure the tests?

When I first started writing the code, I spend most of the time in writing the code only. I did not even think of writing the test cases. One fine day, I read a sentence “ If you are not writing the tests , stop coding”. This quote really impressed me in writing the tests. So, I started hunting the geeks’ libraries.

I have gone through some libraries written by the great coding geeks. They really care about writing the test cases. However, don’t waste your time in writing the test cases. Keep a parallel progress in coding and testing as well.

Elixir comes with nice Testing Framework called ExUnit. If you do not know how to write the test cases, this article really helps you.

You can run the specific tests in different ways. Let’s get into it…

A File with Specific Test Cases

You can write all the test cases inside a file and test them with command

$ mix test path_to_your_file.exs

--

--

Malreddy Ankanna
blackode

Programmer & Writer, I write about coding, thoughts, ideas, personal musings, technical articles, and tutorials.https://bio.link/blackode