Testing and Debugging
There are several features in Nussknacker designed specifically to ease testing and debugging; this page provides a brief explanation of how to use them.
The screenshots are taken from the publicly available demo scenario. You can explore the same scenario live here (no registration required): Demo scenario link
Watching algorithm behavior with counts
Understanding how many data records passed through a given node can give a good overview of how the algorithm behaves and help quickly pinpoint problematic nodes. Click counts button to see the counts snapshot in the time range of your choice. Select a refresh period to watch the counts live.

Counts reveal how many data records each node has processed, making it easy to see where records are filtered out, enriched, split, or forwarded within the scenario.
Watch live data
Live data allow you to watch live data records as they are processed by scenario nodes. Click the live data button in the
Actions menu to activate this functionality - the icon should turn green .
If you double-click the source node, you can examine content of the data records which entered the scenario (top of the left panel).
As the data record traverses the scenario, additional variables can be attached to it, it can be rerouted by the Choice node, it can be filtered out or completely new data records can be created. Just double-click a node of interest to you, to see how many data records entered this node and - for every outgoing branch - how many left the node.
To see how the data record was transformed, choose an input data record in the left panel and examine its content (the variables) upon entry to the node. You can see how this data record was transformed by the node (which variables were added) in the right panel.

Inspecting input and output records for a "Is there any rapid change condition?" node in the scenario from the previous section. 🔍 View full-size image
Testing
You can test your scenario with either manually entered data or with data captured during scenario execution. In both cases, click on the Test button to open the test data input form. Click
+ Add record button to manually enter test data record.
Alternatively, click Append from live data button and specify number of records to be captured with live data.

Form used to prepare input data records for scenario testing, either by manual entry or by appending records captured from live data.
Unless you click the test data record, all data records are displayed using the Elasticsearch way of displaying JSON objects. Once you double-click on the test data record, you will see editable,"regular" JSON object.
Your test data payload should be in the input field.
If your scenario works in the streaming processing mode, you can also modify the inputMeta object content. You can find more on scenario predefined variables here