Hi all,<div><br></div><div><br></div><div>I have written a simple fault injection server in order to test my code.</div><div>I can inject exception, sleep and other some minor perturbations into my code (at some chosen places, let's call them test points) at runtime and it's configured thanks to a simple configuration file written in json.</div>
<div><br></div><div>These perturbations are injected after meeting some conditions. For example, right now, it's based on a counter per test point (if enabled). It this counter reaches zero, there is an action triggered (exception, sleep, ...).</div>
<div><br></div><div>If this mechanism already provides me lot of testing case, I would like though extend it to be able to write conditions which are code injection like, for example, "if N == [].".</div><div>I'm able to use correctly erl_scan and erl_parse to obtain the ast. However, when calling erl_eval:exprs(), I need the bindings of the current function in which this code runs and I've not been able to find out a way to obtain these bindings.</div>
<div><br></div><div>Does anyone know whether it's possible? And if it is, how can I obtain it? :)</div><div><br></div><div><br></div><div><br></div><div>Regards,</div><div>Sebastien Tandel</div>