This is an automated email from the ASF dual-hosted git repository.
git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/plc4x-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 17f27ae Site checkin for project PLC4X: Jenkins Tools
17f27ae is described below
commit 17f27ae62aea8c17f4f235724d9846f0b0f2c4bf
Author: jenkins <[email protected]>
AuthorDate: Thu Feb 20 09:44:15 2020 +0000
Site checkin for project PLC4X: Jenkins Tools
---
developers/building.html | 3 +
developers/code-gen/index.html | 3 +
developers/code-gen/language/freemarker.html | 3 +
developers/code-gen/protocol/df1.html | 3 +
developers/code-gen/protocol/mspec.html | 3 +
developers/conferences.html | 3 +
developers/contributing.html | 3 +
developers/decisions.html | 3 +
developers/index.html | 3 +
developers/infrastructure/ci.html | 3 +
developers/infrastructure/index.html | 3 +
developers/infrastructure/issues.html | 3 +
developers/infrastructure/sonar.html | 3 +
developers/infrastructure/vm.html | 3 +
developers/infrastructure/vpn.html | 3 +
developers/infrastructure/website.html | 3 +
developers/infrastructure/wiki.html | 3 +
developers/jqassistant.html | 3 +
developers/maturity.html | 3 +
developers/preparing/index.html | 3 +
developers/preparing/linux.html | 3 +
developers/preparing/macos.html | 3 +
developers/preparing/windows.html | 3 +
developers/release/build-tools.html | 3 +
developers/release/index.html | 3 +
developers/release/release.html | 3 +
developers/release/validation.html | 3 +
developers/team.html | 3 +
developers/tutorials/index.html | 3 +
.../testing-serializers-and-parsers.html} | 219 ++++++++++++---------
developers/tutorials/writing-driver.html | 3 +
sitemap.html | 4 +-
32 files changed, 215 insertions(+), 98 deletions(-)
diff --git a/developers/building.html b/developers/building.html
index 9ec815b..3e48d3b 100644
--- a/developers/building.html
+++ b/developers/building.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/code-gen/index.html b/developers/code-gen/index.html
index 0e82f2c..2e25071 100644
--- a/developers/code-gen/index.html
+++ b/developers/code-gen/index.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/code-gen/language/freemarker.html
b/developers/code-gen/language/freemarker.html
index 861abae..f1e7f2d 100644
--- a/developers/code-gen/language/freemarker.html
+++ b/developers/code-gen/language/freemarker.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../../developers/tutorials/writing-driver.html"
class="nav-link">Writing Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/code-gen/protocol/df1.html
b/developers/code-gen/protocol/df1.html
index 8c86a0c..11da5fa 100644
--- a/developers/code-gen/protocol/df1.html
+++ b/developers/code-gen/protocol/df1.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../../developers/tutorials/writing-driver.html"
class="nav-link">Writing Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/code-gen/protocol/mspec.html
b/developers/code-gen/protocol/mspec.html
index ed39f44..015ccfd 100644
--- a/developers/code-gen/protocol/mspec.html
+++ b/developers/code-gen/protocol/mspec.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../../developers/tutorials/writing-driver.html"
class="nav-link">Writing Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/conferences.html b/developers/conferences.html
index 7ccb6a3..d71f139 100644
--- a/developers/conferences.html
+++ b/developers/conferences.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/contributing.html b/developers/contributing.html
index 30ac3da..704b744 100644
--- a/developers/contributing.html
+++ b/developers/contributing.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/decisions.html b/developers/decisions.html
index c43fd4c..cdde354 100644
--- a/developers/decisions.html
+++ b/developers/decisions.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/index.html b/developers/index.html
index 22fadc1..2c3fb2e 100644
--- a/developers/index.html
+++ b/developers/index.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/infrastructure/ci.html
b/developers/infrastructure/ci.html
index 7f9a7c5..fa20aec 100644
--- a/developers/infrastructure/ci.html
+++ b/developers/infrastructure/ci.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/infrastructure/index.html
b/developers/infrastructure/index.html
index 367787c..8f120f0 100644
--- a/developers/infrastructure/index.html
+++ b/developers/infrastructure/index.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/infrastructure/issues.html
b/developers/infrastructure/issues.html
index e64d4f8..bf05061 100644
--- a/developers/infrastructure/issues.html
+++ b/developers/infrastructure/issues.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/infrastructure/sonar.html
b/developers/infrastructure/sonar.html
index 051010a..8b3c363 100644
--- a/developers/infrastructure/sonar.html
+++ b/developers/infrastructure/sonar.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/infrastructure/vm.html
b/developers/infrastructure/vm.html
index a367a54..a694e09 100644
--- a/developers/infrastructure/vm.html
+++ b/developers/infrastructure/vm.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/infrastructure/vpn.html
b/developers/infrastructure/vpn.html
index 1bd9bd5..e8b2024 100644
--- a/developers/infrastructure/vpn.html
+++ b/developers/infrastructure/vpn.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/infrastructure/website.html
b/developers/infrastructure/website.html
index 57329ff6..a51e0c6 100644
--- a/developers/infrastructure/website.html
+++ b/developers/infrastructure/website.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/infrastructure/wiki.html
b/developers/infrastructure/wiki.html
index 2098ee4..905b04c 100644
--- a/developers/infrastructure/wiki.html
+++ b/developers/infrastructure/wiki.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/jqassistant.html b/developers/jqassistant.html
index aadaf35..783ac3d 100644
--- a/developers/jqassistant.html
+++ b/developers/jqassistant.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/maturity.html b/developers/maturity.html
index 537ebff..3eecda3 100644
--- a/developers/maturity.html
+++ b/developers/maturity.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/preparing/index.html b/developers/preparing/index.html
index d306759..168f08d 100644
--- a/developers/preparing/index.html
+++ b/developers/preparing/index.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/preparing/linux.html b/developers/preparing/linux.html
index ee6e6a7..172af4c 100644
--- a/developers/preparing/linux.html
+++ b/developers/preparing/linux.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/preparing/macos.html b/developers/preparing/macos.html
index 17b33c6..2c2b818 100644
--- a/developers/preparing/macos.html
+++ b/developers/preparing/macos.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/preparing/windows.html
b/developers/preparing/windows.html
index 6a9f863..2c5d006 100644
--- a/developers/preparing/windows.html
+++ b/developers/preparing/windows.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/release/build-tools.html
b/developers/release/build-tools.html
index 13636a2..4915db1 100644
--- a/developers/release/build-tools.html
+++ b/developers/release/build-tools.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/release/index.html b/developers/release/index.html
index b0a8486..6c9218e 100644
--- a/developers/release/index.html
+++ b/developers/release/index.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/release/release.html b/developers/release/release.html
index 2c52a92..36ec990 100644
--- a/developers/release/release.html
+++ b/developers/release/release.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/release/validation.html
b/developers/release/validation.html
index bc63122..132bdad 100644
--- a/developers/release/validation.html
+++ b/developers/release/validation.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/team.html b/developers/team.html
index 1e1d103..8960346 100644
--- a/developers/team.html
+++ b/developers/team.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/tutorials/index.html b/developers/tutorials/index.html
index bf96022..61e4e33 100644
--- a/developers/tutorials/index.html
+++ b/developers/tutorials/index.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/developers/preparing/macos.html
b/developers/tutorials/testing-serializers-and-parsers.html
similarity index 72%
copy from developers/preparing/macos.html
copy to developers/tutorials/testing-serializers-and-parsers.html
index 17b33c6..ac208c7 100644
--- a/developers/preparing/macos.html
+++ b/developers/tutorials/testing-serializers-and-parsers.html
@@ -89,7 +89,7 @@
<a href="../../developers/preparing/linux.html"
class="nav-link">Linux</a>
</li>
<li class="nav-item">
- <strong class="nav-link">Mac OS</strong>
+ <a href="../../developers/preparing/macos.html"
class="nav-link">Mac OS</a>
</li>
<li class="nav-item">
<a href="../../developers/preparing/windows.html"
class="nav-link">Windows</a>
@@ -114,6 +114,9 @@
<li class="nav-item">
<a
href="../../developers/tutorials/writing-driver.html" class="nav-link">Writing
Drivers</a>
</li>
+ <li class="nav-item">
+ <strong class="nav-link">Testing Drivers</strong>
+ </li>
</ul>
</li>
@@ -205,163 +208,185 @@
</div>
</nav>
<main role="main"
class="ml-sm-auto px-4 col-sm-pull col-md-9 col-lg-10 h-100">
- <div class="sect1">
-<h2 id="mac_os">Mac OS</h2>
+ <h1>Testing Serializers and Parsers</h1>
+<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
-<p>Most libraries on Mac are installed using <code>Homebrew</code>.</p>
+<p>Currently the build generates the serializers and parsers from a provided
<code>mspec</code> specification.</p>
</div>
<div class="paragraph">
-<p>Make sure <code>Homebrew</code> ist installed in order to install most of
these.</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>/usr/bin/ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)"</pre>
-</div>
+<p>A typical full round-trip test for the model, parsers and serializers would
look as follows:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Starting from a byte array</p>
+</li>
+<li>
+<p>The parser is used to parse the byte array</p>
+</li>
+<li>
+<p>The parsed model instance is compared with an expected model</p>
+</li>
+<li>
+<p>If the expected model matched the expected one the model is serialized back
to a byte array</p>
+</li>
+<li>
+<p>The resulting byte array is compared to the original byte array</p>
+</li>
+<li>
+<p>If the byte arrays are identical, the round-trip is regarded ok</p>
+</li>
+</ul>
</div>
-<div class="sect2">
-<h3 id="git">Git</h3>
<div class="paragraph">
-<p>Checking:</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>git --version</pre>
-</div>
+<p>Doing this manually would require a lot of manual object construction and
validation, so we created a framework for creating such tests.</p>
</div>
<div class="paragraph">
-<p>If you get any successful output, you probably don’t need to do
anything.</p>
+<p>As XML, no matter what you think about it, allows simple and easy readable
descriptions these tests are provided as <code>XML files</code>.</p>
</div>
<div class="paragraph">
-<p>In order to install it, please execute the following command:</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>brew install git</pre>
-</div>
+<p>All generated model classes allow parsing and serializing to XML via
<code>Jackson</code>.</p>
</div>
</div>
-<div class="sect2">
-<h3 id="libpcap">LibPCAP</h3>
-
</div>
-<div class="sect2">
-<h3 id="gcc">gcc</h3>
+<div class="sect1">
+<h2 id="structure_of_a_test">Structure of a test</h2>
+<div class="sectionbody">
<div class="paragraph">
-<p>Checking:</p>
+<p>A typical test looks like this:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>gcc --version</pre>
+<pre> <testcase>
+ <name>Read Input Registers Request</name>
+ <raw>000000000006ff0408d20002</raw>
+ <root-type>ModbusTcpADU</root-type>
+ <parser-arguments>
+ <response>false</response>
+ </parser-arguments>
+ <xml>
+ <ModbusTcpADU
className="org.apache.plc4x.java.modbus.readwrite.ModbusTcpADU">
+ <transactionIdentifier>0</transactionIdentifier>
+ <unitIdentifier>255</unitIdentifier>
+ <pdu
className="org.apache.plc4x.java.modbus.readwrite.ModbusPDUReadInputRegistersRequest">
+ <startingAddress>2258</startingAddress>
+ <quantity>2</quantity>
+ </pdu>
+ </ModbusTcpADU>
+ </xml>
+ </testcase></pre>
</div>
</div>
<div class="paragraph">
-<p>If you get any successful output, you probably don’t need to do
anything.</p>
+<p>As you can see, the <code>name</code> provides a simple human readable name
for the test which is used for reporting success and failure.</p>
</div>
<div class="paragraph">
-<p>It seems macOS comes with a version of gcc which is good enough for our
usecases.</p>
-</div>
+<p>The <code>raw</code> element contains the <code>hex-representation</code>
of the <code>binary input</code>.</p>
</div>
-<div class="sect2">
-<h3 id="g">g++</h3>
<div class="paragraph">
-<p>Checking:</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>g++ --version</pre>
-</div>
+<p>After that the <code>root-type</code> specifies the base type used for
parsing this data. In above example the test will use the
<code>ModbusTcpADUIO.serialize</code> and <code>ModbusTcpADUIO.parse</code>
methods for serializing and parsing.</p>
</div>
<div class="paragraph">
-<p>If you get any successful output, you probably don’t need to do
anything.</p>
+<p>Some parsers require additional parameters for parsing. In above example
the Modbus protocol can’t decide if something is a request or response
from the data itself, so we have to pass that information in using a
<code>parser-arguments</code> argument.</p>
</div>
<div class="paragraph">
-<p>It seems macOS comes with a version of g++ which is good enough for our
usecases.</p>
-</div>
+<p>The final element is the <code>xml</code> element, which contains the XML
representation of the parsed object.</p>
</div>
-<div class="sect2">
-<h3 id="dotnet">dotnet</h3>
<div class="paragraph">
-<p>Checking:</p>
+<p>Each test implements exactly the test-strategy sketched above, however for
comparing the parsed and the expected model, we use <code>XMLUint</code> to
serialize the parsed model to XML and compare that to the given XML in the
test-case declaration.</p>
</div>
-<div class="literalblock">
-<div class="content">
-<pre>dotnet --version</pre>
</div>
</div>
+<div class="sect1">
+<h2 id="structure_of_a_testsuite">Structure of a testsuite</h2>
+<div class="sectionbody">
<div class="paragraph">
-<p>If you get any successful output, you probably don’t need to do
anything.</p>
+<p>Multiple tests are usually wrapped into a testsuite document.</p>
</div>
<div class="paragraph">
-<p>Microsoft is offering an installer for MacOS which is available from <a
href="https://dotnet.microsoft.com/download/dotnet-core/2.2">here</a>.</p>
-</div>
+<p>In general this is just a container with a given testsuite
<code>name</code> and a number of <code>testcase</code> elements.</p>
</div>
-<div class="sect2">
-<h3 id="python">python</h3>
<div class="paragraph">
-<p>Checking:</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>python --version</pre>
-</div>
+<p>One important setting however controls the endianness of the protocol in
general.</p>
</div>
<div class="paragraph">
-<p>If you get a version of 2.7 or higher reported, you probably don’t
need to do anything.</p>
+<p>This is controlled with a <code>bigEndian</code> attribute in the testsuite
root element.</p>
</div>
<div class="paragraph">
-<p>In order to install it, please execute the following command:</p>
+<p>An example testsuite document looks as follows:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>brew install python@2</pre>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="bison">bison</h3>
-<div class="paragraph">
-<p>Checking:</p>
+<pre><?xml version="1.0" encoding="UTF-8"?>
+<test:testsuite
xmlns:test="https://plc4x.apache.org/schemas/parser-serializer-testsuite.xsd"
+ bigEndian="true">
+
+ <name>Allen-Bradley DF1</name>
+
+ <testcase>
+ ...
+ </testcase>
+
+ <testcase>
+ ...
+ </testcase>
+
+ <testcase>
+ ...
+ </testcase>
+
+ <testcase>
+ ...
+ </testcase>
+
+</test:testsuite></pre>
</div>
-<div class="literalblock">
-<div class="content">
-<pre>python --version</pre>
</div>
</div>
-<div class="paragraph">
-<p>If you get a version above 2.3 output, you don’t need to do
anything.</p>
</div>
+<div class="sect1">
+<h2 id="the_junit_runner">The Junit runner</h2>
+<div class="sectionbody">
<div class="paragraph">
-<p>macOS comes with a pre-installed version of bison, however this version is
2.3 and hereby too old.
-So you need to update to a more recent version:</p>
+<p>All logic is implemented in the <code>plc4j-utils-test-utils</code> module,
so make sure to add the following test-dependency:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>brew install bison
-brew link bison --force
-echo 'export PATH="/usr/local/opt/bison/bin:$PATH"' >>
~/.bash_profile</pre>
+<pre> <dependency>
+ <groupId>org.apache.plc4x</groupId>
+ <artifactId>plc4j-utils-test-utils</artifactId>
+ <version>{project.version}</version>
+ <scope>test</scope>
+ </dependency></pre>
</div>
</div>
<div class="paragraph">
-<p>Be sure to reboot or at least restart your IDE or commandline in order for
the changes to become effective.</p>
+<p>In order to run these tests as part of the build, as a last step we need to
create a test-runner class.</p>
</div>
+<div class="paragraph">
+<p>This is generally just a hand-full of boilerplate code, telling the test
which document to use for testing.</p>
</div>
-<div class="sect2">
-<h3 id="flex">flex</h3>
<div class="paragraph">
-<p>Checking:</p>
+<p>Following code snippet sort of looks the same for every testsuite:</p>
</div>
-<div class="literalblock">
+<div class="listingblock">
<div class="content">
-<pre>flex --version</pre>
-</div>
+<pre>package org.apache.plc4x.java.modbus;
+
+import org.apache.plc4x.test.parserserializer.ParserSerializerTestsuiteRunner;
+
+public class ModbusIOTest extends ParserSerializerTestsuiteRunner {
+
+ public ModbusIOTest() {
+ super("/testsuite/ModbusTestsuite.xml");
+ }
+
+}</pre>
</div>
-<div class="paragraph">
-<p>If you get any successful output, you probably don’t need to do
anything.</p>
</div>
<div class="paragraph">
-<p>It seems macOS comes with a version of flex which is good enough for our
usecases.</p>
-</div>
+<p>Here the document <code>ModbusTestsuite.xml</code> is located in the
directory: <code>src/test/resources/testsuite/</code>.</p>
</div>
</div>
</div>
diff --git a/developers/tutorials/writing-driver.html
b/developers/tutorials/writing-driver.html
index 74e2d1c..6cd13d2 100644
--- a/developers/tutorials/writing-driver.html
+++ b/developers/tutorials/writing-driver.html
@@ -114,6 +114,9 @@
<li class="nav-item">
<strong class="nav-link">Writing Drivers</strong>
</li>
+ <li class="nav-item">
+ <a
href="../../developers/tutorials/testing-serializers-and-parsers.html"
class="nav-link">Testing Drivers</a>
+ </li>
</ul>
</li>
diff --git a/sitemap.html b/sitemap.html
index 23e7249..76efcdf 100644
--- a/sitemap.html
+++ b/sitemap.html
@@ -214,7 +214,9 @@
<ul>
-<li><a href="developers/tutorials/writing-driver.html">Writing
Drivers</a></li></ul></li>
+<li><a href="developers/tutorials/writing-driver.html">Writing Drivers</a></li>
+
+<li><a
href="developers/tutorials/testing-serializers-and-parsers.html">Testing
Drivers</a></li></ul></li>
<li><a href="developers/code-gen/index.html">Code Generation</a>