This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft-website.git
The following commit(s) were added to refs/heads/master by this push:
new 9fbe4da Update test_framework.html
9fbe4da is described below
commit 9fbe4dadcf25d7b112b6228e3323aca97440260f
Author: Aaron Radzinski <[email protected]>
AuthorDate: Sat Aug 7 22:49:40 2021 -0700
Update test_framework.html
---
tools/test_framework.html | 61 +++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 56 insertions(+), 5 deletions(-)
diff --git a/tools/test_framework.html b/tools/test_framework.html
index 22cda6c..2d9c13d 100644
--- a/tools/test_framework.html
+++ b/tools/test_framework.html
@@ -22,14 +22,14 @@ fa_icon: fa-tools
limitations under the License.
-->
-<div class="col-md-8 second-column">
+<div class="col-md-8 second-column" xmlns="http://www.w3.org/1999/html">
<section id="overview">
<h2 class="section-title">Overview <a href="#"><i class="top-link fas
fa-fw fa-angle-double-up"></i></a></h2>
<p>
- NLPCraft comes built-in with a simple to use testing framework
that can be used with any
+ NLPCraft comes built-in with a simple-to-use testing framework
that can be used with any
popular unit testing JVM frameworks such as <a
href="https://testng.org">TestNG</a> or
<a href="https://junit.org">JUnit</a>. Test framework is
essentially a simplified implementation
- of the REST client tailor made for model unit testing.
+ of the REST client tailor-made for model unit testing.
</p>
<p>
Test framework consists of the following types in
<code>org.apache.nlpcraft.model.tools.test</code> package:
@@ -194,6 +194,7 @@ public class AlarmModel extends NCModelFileAdapter {
<div class="tab-content">
<div class="tab-pane fade show active" id="nav-script"
role="tabpanel">
<pre class="brush: bash">
+ $ bin/nlpcraft.sh help --cmd=test-model
$ bin/nlpcraft.sh test-model --cp=/path/to/my/model/classes
</pre>
<p>
@@ -226,10 +227,60 @@ public class AlarmModel extends NCModelFileAdapter {
Make sure to add necessary classpath components for
the model(s) you want to auto-validate.
</li>
<li>
- <code>NLPCRAFT_TEST_MODELS</code> system property that
should contain comma separate list of the data model classes to test.
+ Specify the following three system property (all
optional):
+ <table class="gradient-table">
+ <thead>
+ <tr>
+ <th>System Property</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>NLPCRAFT_TEST_MODELS</code></td>
+ <td>
+ <p>
+ Optional system property that
should contain comma separate
+ list of the data model classes to
test. If not provided, the models from the probe
+ configuration will be used.
+ </p>
+ <p>
+ <b>Example:</b><br/>
+
<code>-DNLPCRAFT_TEST_MODELS=org.apache.nlpcraft.examples.alarm.AlarmModel</code>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td><code>NLPCRAFT_PROBE_CONFIG</code></td>
+ <td>
+ <p>
+ Optional system property that
should contain the path to probe configuration file.
+ If not provided, the default probe
configuration file will be used.
+ </p>
+ <p>
+ <b>Example:</b><br/>
+
<code>-NLPCRAFT_PROBE_CONFIG=/opt/my_probe/probe.conf</code>
+ </p>
+ </td>
+ </tr>
+ <tr>
+
<td><code>NLPCRAFT_TEST_INTENT_IDS</code></td>
+ <td>
+ <p>
+ Optional system property that
should contain the optional comma separated list of
+ intent IDs to test. If not
provided, all detected intents will be tested.
+ </p>
+ <p>
+ <b>Example:</b><br/>
+
<code>-NLPCRAFT_TEST_INTENT_IDS=int1,int2</code>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
</li>
<li>
- You can also use
<code>org.apache.nlpcraft.model.tools.test.NCTestAutoModelValidator</code> class
+ You can also use <a target="javadoc"
href="/apis/latest/org/apache/nlpcraft/model/tools/test/NCTestAutoModelValidator.html">NCTestAutoModelValidator</a>
class
directly to call it programmatically from the code or
from IDE.
</li>
</ul>