Properly testing an OTP application after initialization

Nicolas Martyanoff khaelin@REDACTED
Sun Sep 13 19:28:31 CEST 2020


On 2020-09-13 12:17, Lincoln Bryant wrote:
> Now that I want to start wiring the testing framework up to my CI
> tool, I am wondering if I should do something like start my
> application, connect a shell to it, run my tests, and shut down? or
> should I take a step back entirely and consider using something like
> Common Test instead?

You could start your application before the tests and stop it after. EUnit
supports fixtures[1] to do just that.

If you use them, you do not need to do anything with a shell and tests can be
run in a fully automated way.

[1] https://erlang.org/doc/apps/eunit/chapter.html#Fixtures

-- 
Nicolas Martyanoff
http://snowsyn.net
khaelin@REDACTED


More information about the erlang-questions mailing list