Common Test framework missing from my Erlang Install

I’m running an MX-Linux environment (Debian distro) and have installed (via asdf) and been using Erlang/Elixir for quite some time. I decided to try out the Common Test framework but it seems the framework isn’t present on my machine:

$ erl
Erlang/OTP 27 [erts-15.2] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns] [sharing-preserving]

Eshell V15.2 (press Ctrl+G to abort, type help(). for help)
1> application:loaded_applications().
[{stdlib,"ERTS  CXC 138 10","6.2"},
 {kernel,"ERTS  CXC 138 10","10.2"}]
2>

Apparently common_test is supposed to appear if the framework is available.

How do I get Common Test framework installed on my machine?

No, you do not need to install anything. The reason you don’t see common_test in the list is that it hasn’t been loaded in the shell. By default, many applications, including common_test, are not loaded automatically. You can load it manually by running the following command in the Erlang shell application:loaded_applications().:

1> application:loaded_applications().
[{kernel,"ERTS  CXC 138 10","8.5.4.2"},
 {stdlib,"ERTS  CXC 138 10","4.3.1.3"}]
2> application:load(common_test).
ok
3> application:loaded_applications().
[{common_test,"The OTP Common Test application","1.24.0.1"},
 {kernel,"ERTS  CXC 138 10","8.5.4.2"},
 {stdlib,"ERTS  CXC 138 10","4.3.1.3"}]
2 Likes