<br><br><div class="gmail_quote">On Wed, Mar 18, 2009 at 3:13 PM, John Lange <span dir="ltr">&lt;<a href="mailto:john@johnlange.ca">john@johnlange.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, 2009-03-18 at 22:56 +0200, Tzafrir Cohen wrote:<br>
&gt; How can they be tested?<br>
&gt;<br>
&gt; Let&#39;s take one case: CDR to either sqlite or CSV (those two cases are<br>
&gt; the simplest as they require no third-party DB).<br>
&gt;<br>
&gt; Can you come up with a system that starts Asterisk, runs a number of<br>
&gt; scenarios automatically, and cheks of the CDR is OK?<br>
<br>
</div>Yes. Perhaps I&#39;m not understanding something about your question? This<br>
is *nix, automation and scripting is what it does well.<br>
<br>
For example, CDR. Since the tests are the same every time, the CDR<br>
should be the same. Just a simple &quot;diff&quot; comparing the CDRs would flag<br>
anything that changed. Something similar could probably done with AMI<br>
and even console output just to flag abnormalities.</blockquote><div><br>Believe me, if this was all that was needed, I&#39;d have implemented this two years ago!<br>The trouble is, that the times change from test to test. And therefore, you&#39;ll not<br>
be able to diff CDR&#39;s from test to test. Some interesting scripts could be written<br>to just verify that one timepoint is equal to another, that one timepoint is between<br>two others, perhaps on other CDR&#39;s, but the element of reproducibility is not there.<br>
Even if I had done time differentials instead of absolute times, there would be no<br>way to get around the round-off differences from test to test.<br><br>&lt;shameless self-promotion&gt; In the CEL based CDR generator I was working on (and now, <br>
without funding, unable to finish), I have designed it to be testable, and thus<br>reproducible. I was sick and tired of charting out CDRs by hand, tracking times<br>and fields thru xfers, over and over again! If I were going to run regressions, I<br>
wanted to run thru a couple dozen scenaros in a few seconds!&lt;/shameless self-promotion&gt;<br><br>And I&#39;m not even going to mention how the times on anything but simple CDR&#39;s are<br>wrong to begin with...  ;)  ooops, sorry!<br>
<br>murf<br><br></div></div><br>-- <br>Steve Murphy<br>ParseTree Corp<br><br>