LaForge's home page (Posts about testing)https://laforge.gnumonks.org/blog/tags/testing.atom2022-06-21T07:49:57ZHarald WelteNikolaTesting (not only) telecom protocolshttps://laforge.gnumonks.org/blog/20170212-telecom-testing-ttcn/2017-02-12T00:00:00+01:002017-02-12T00:00:00+01:00Harald Welte<p>When implementing any kind of communication protocol, one always dreams
of some existing test suite that one can simply run against the
implementation to check if it performs correct in at least those use
cases that matter to the given application.</p>
<p>Of course in the real world, there rarely are protocols where this is
true. If test specifications exist at all, they are often just very
abstract texts for human consumption that you as the reader should
implement yourself.</p>
<p>For some (by far not all) of the protocols found in cellular networks,
every so often I have seen some formal/abstract machine-parseable test
specifications. Sometimes it was TTCN-2, and sometimes TTCN-3.</p>
<p>If you haven't heard about TTCN-3, it is basically a way to create
functional tests in an abstract description (textual + graphical), and
then compile that into an actual executable tests suite that you can run
against the implementation under test.</p>
<p>However, when I last did some research into this several years ago, I
couldn't find any Free / Open Source tools to actually use those
formally specified test suites. This is not a big surprise, as even
much more fundamental tools for many telecom protocols are missing, such
as good/complete ASN.1 compilers, or even CSN.1 compilers.</p>
<p>To my big surprise I now discovered that Ericsson had released their
(formerly internal) <a class="reference external" href="https://projects.eclipse.org/projects/tools.titan">TITAN TTCN3 Toolset</a>
as Free / Open Source Software under EPL 1.0. The project is even part
of the Eclipse Foundation. Now I'm certainly not a friend of Java or
Eclipse by all means, but well, for running tests I'd certainly not
complain.</p>
<p>The project also doesn't seem like it was a one-time code-drop but seems
very active with many repositories on gitub. For example for the core
module, <a class="reference external" href="https://github.com/eclipse/titan.core">titan.core</a> shows
plenty of activity on an almost daily basis. Also, <a class="reference external" href="https://projects.eclipse.org/projects/tools.titan/downloads">binary releases for
a variety of distributions are made available</a>. They
even have a <a class="reference external" href="https://www.youtube.com/watch?v=T__msvMhhHQ&feature=youtu.be">video showing the installation</a> ;)</p>
<p>If you're curious about TTCN-3 and TITAN, Ericsson also have made
available a great <a class="reference external" href="https://www.eclipse.org/downloads/download.php?file=/titan/TITAN_User_P.pdf">200+ pages slide set about TTCN-3 and TITAN</a>.</p>
<p>I haven't yet had time to play with it, but it definitely is rather high
on my TODO list to try.</p>
<p>ETSI provides a couple of test suites in TTCN-3 for protocols like
DIAMETER, GTP2-C, DMR, IPv6, S1AP, LTE-NAS, 6LoWPAN, SIP, and others at
<a class="reference external" href="http://forge.etsi.org/websvn/">http://forge.etsi.org/websvn/</a> (It's also the first time I've seen that
ETSI has a SVN server. Everyone else is using git these days, but yes,
revision control systems rather than periodic ZIP files is definitely a
big progress. They should do that for their reference codecs and ASN.1
files, too.</p>
<p>I'm not sure once I'll get around to it. Sadly, there is no TTCN-3 for
SCCP, SUA, M3UA or any SIGTRAN related stuff, otherwise I would want to
try it right away. But it definitely seems like a very interesting
technology (and tool).</p>