<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<div><br></div><div>I have a application that I want to pass different config files, one for production and one for running tests.</div><div><br></div><div>







<p class="p1">sh-3.2# cat $PROJECT/test/app.config </p>
<p class="p1"><span style="font-size: 12pt;">[</span><span style="font-size: 12pt;">{sample_app, [{test, test}]}].</span></p><p class="p1"><br></p><p class="p1">I have also tried using</p><p class="p1"><span style="font-size: 12pt;">{sample_app, [{test, test}]}.</span></p><p class="p1"><br></p><p class="p1">and this is my test case, located in $PROJECT/test/sample_app_SUITE.erl directory</p><p class="p1"><br></p><p class="p1"><span class="s1">my_test</span>_case(<span class="s2">_Config</span>) <span class="s3"><b>-></b></span></p><p class="p1">    <span class="s2">Result</span> <span class="s3"><b>=</b></span> application:load(<span class="s4">sample_app</span>),</p><p class="p1">    <span class="s2">Environment</span> <span class="s3"><b>=</b></span> application:get_all_env(<span class="s4">sample_app</span>),</p><p class="p2"><span class="s5">    ct:pal(</span>"Loaded Environment:<span class="s6">~p</span>"<span class="s5">, </span><span class="s7">[</span><span class="s2">Result</span><span class="s7">]</span><span class="s5">),</span></p><p class="p2"><span class="s5">    ct:pal(</span>"Loaded variables:<span class="s6">~p</span>"<span class="s5">, </span><span class="s7">[</span><span class="s2">Environment</span><span class="s7">]</span><span class="s5">),</span></p><p class="p1">












</p><p class="p1">    <span class="s4">ok</span>.</p><div><br></div><div>My source code as of now has nothing. When I run "./rebar ct" and look into log files I see the below result</div></div><div><br></div><div>
<p class="p1">----------------------------------------------------</p>
<p class="p1">2014-02-06 23:41:37.328</p>
<p class="p1">Loaded Environment:ok</p>
<p class="p1">----------------------------------------------------</p>
<p class="p1">2014-02-06 23:41:37.329</p>
<p class="p1">Loaded variables:[{included_applications,[]}]</p><p class="p1"><br></p><p class="p1">I tried without rebar too</p><p class="p1"><br></p><p class="p1">ct_run -noshell -pa "/WorkArea/sample/ebin" "/WorkArea/sample/rebar/rebar/ebin" "/WorkArea/sample/rebar" "/WorkArea/sample/."   -name test@Maruthavanans-iMac.local -logdir "/WorkArea/sample/logs" -env TEST_DIR "/WorkArea/sample/test"   -config test/app.config -dir test >> /WorkArea/sample/logs/raw.log</p><p class="p1"><br></p><p class="p1">Why my app.config variables are not merge and what should I do to get those impacted in environment variables before a test starts? Am I missing out something?</p><p class="p1"><br></p><p class="p1">Note: I am able to get the config variable over a file when I use erl -config <files></p></div>                                    </div></body>
</html>