<br><br><div class="gmail_quote">On Wed, Mar 18, 2009 at 3:13 PM, John Lange <span dir="ltr"><<a href="mailto:john@johnlange.ca">john@johnlange.ca</a>></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>
> How can they be tested?<br>
><br>
> Let's take one case: CDR to either sqlite or CSV (those two cases are<br>
> the simplest as they require no third-party DB).<br>
><br>
> Can you come up with a system that starts Asterisk, runs a number of<br>
> scenarios automatically, and cheks of the CDR is OK?<br>
<br>
</div>Yes. Perhaps I'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 "diff" 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'd have implemented this two years ago!<br>The trouble is, that the times change from test to test. And therefore, you'll not<br>
be able to diff CDR'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'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><shameless self-promotion> 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!</shameless self-promotion><br><br>And I'm not even going to mention how the times on anything but simple CDR'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>