Creating a command line test script with ExUnit

Hey everyone,

I’m TA’ing a class in concurrency this semester and I’ve been trying to create a testing script with ExUnit in Elixir to test the various modules that the students are going to be submitting (in Erlang, but no problem there). The problem I keep coming across is actually getting ExUnit to setup and run the tests when I try to call the testing script from a command line tool that collects all the files. The command-line tool compiles the file and then calls upon the ExUnit testing script and all the modules have the same name, so the testing itself is entirely independent of the compilation process, assuming it does actually compile. The issue is that when I call out to the testing script, it either doesn’t do any testing or it times out. When looking at observer, it was timing out because ExUnit did not have any tests to run.

I came across [this article] (,iex,mix,exunit/2016/05/09/iex-pry-within-a-test-case.html), which is pretty similar to what I would like to do, but it doesn’t work. Has anyone tried doing something similar or have any advice? Running mix test on a sample file works just fine, but I would prefer to use this as a command-line tool where you pass in the location of the test file and it runs the tests on each of the students’ files.

Without seeing your code I’d do it by just interpreting the files. Basically where are you getting stuck at?