Acquia Journey allows you to test graphs and nodes interactively prior to deployment. This allows you to test a graph with defined test cases. The Project Editor with the testing console expanded is displayed below:
Only a valid graph can be tested. You can validate a graph by clicking the Validate link at the top right of the graph canvas. If the graph is valid, the Valid Graph icon is displayed. If the graph is not valid, you must fix the validation error before the testing console can be used. For more information on troubleshooting errors, read the Acquia Journey troubleshooting guide.
The testing console is available at the bottom of the graph window. It is displayed below, collapsed:
The testing console provides insight into both the execution of each step in the graph, as well as the state of the data store and public variables at the end of the graph's execution. To access the testing console for your graph, complete the following steps:
- Sign in to Acquia Journey.
- On the main project page (accessible by clicking the Acquia Journey logo in the top menu), find the project
that you want to modify, and click its Project Editor icon.
- Select the graph you want to test, and then click Open at the bottom of the panel.
- Click the Arrow icon to expand the testing console.
The testing console provides the following controls:
|Starts the graph engine and displays the Testing Settings dialog. The control is disabled when the graph is executing, and is available only for valid graphs.|
|Stops the execution of the current graph. When the graph is executing, this control is green; when not executing, it is gray.|
|Clears the testing console and removes information from all previous runs.|
|Maximizes or minimizes the testing console. The console can also be enlarged or shrunk by grabbing the bar between the graph window and the console and moving it up or down.|
To configure your test settings, click Start. The test configuration varies based on whether your graph has a listener attached or not:
- If your graph does not have a listener attached, you will see the Test Settings dialog below:
- If your graph has a listener attached, you will see the Test Settings dialog below:
In the Data (JSON) section, you can include a valid JSON payload, such as from the execution of another graph.
If the graph has a listener, the Testing Settings dialog box includes three mutually exclusive modes of testing the graph:
- Iterations - Graph executes until the specified number of iterations has occurred.
- Duration - Graph executes until the number of seconds has elapsed.
- Data - Graph executes a single time with the specified data payload.
During visual testing, graph execution is limited to prevent interactive graphs from locking up engines unnecessarily:
- Maximum number of iterations - 1,000
- Duration - Maximum runtime of any graph is 30 minutes
Testing console output
The testing console will display Running if the graph is a listener, and then display Finished if the graph is not a listener.
To view the console output, you must click the expand icon in the Test Console. For each transaction, click the expand icon to display the execution details for that transaction. Each transaction displays a row for every graph node. The final two rows display Total Elapsed Time and Data Store Values, respectively. The most recent execution of the graph will always be appended to the end of the Testing Console log. An example of the Testing Console output is displayed below:
The testing console displays the following information for every node executed in a transaction:
- Name of the node and, if it is an adaptor, its type
- Execution time (usually in milliseconds)
- Return value of the node
In addition, after a transaction completes, the Total Elapsed Time is reported.
You can examine the Data Store Values after a transaction completes by clicking the expand icon next to each value you want to display. You can examine the entire data schema by clicking Expand All. If you want to copy some or all of the data schema, click Display JSON to open a dialog with the schema in JSON format.
If an error occurs with one of your nodes during execution of a transaction, the row of the offending node is displayed highlighted in orange in the Testing Console. An example with detail of the error message from the engine is displayed below:
If the graph is a listener and there are multiple iterations, pointing to a transaction will indicate its path on the graph by highlighting the path with an orange highlight.