<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">Hey everyone,
<div><br /></div>
<div>How do you go about EUnit testing that requires the whole application to be running before the test ?</div>
<div><br /></div>
<div>For example, my erlang application starts one pool of processes that connects to a database and another that connects to another server in our backend. To run any real tests, I’m going to need to have one or both of those systems up and running. The way that I’m doing is right now is below, and it is very cluge-y feeling:</div>
<div><br /></div>
<div>
<div>ok = application:start(compiler),</div>
<div>ok = application:start(syntax_tools),</div>
<div>ok = application:start(goldrush),</div>
<div>ok = application:start(gproc),</div>
<div>ok = application:start(gen_logger),</div>
<div>ok = application:start(pooler),</div>
<div>ok = application:start(quickrand),</div>
<div>ok = application:start(re2),</div>
<div>ok = application:start(lz4),</div>
<div>ok = application:start(uuid),</div>
<div>ok = application:start(semver),</div>
<div>ok = application:start(snappy),</div>
<div>ok = application:start(cqerl),</div>
<div>ok = application:start(ecpool),</div>
<div>ok = application:start(esockd),</div>
<div>ok = application:start(lager_syslog),</div>
<div>ok = application:start(lager),</div>
</div>
<div><br /></div>
<div><br /></div>
<div>This system works because none of the above applications require any environment variables from a config file. So some of my other applications can’t run using this. Is there any way to have eunit run the test after starting the whole application? </div>
<div><br /></div>
<div>Thanks!</div>
<div><br /></div>
</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
<div></div>
</div>
</body>
</html>