Testing a graph

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:

Journey testing console

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.

Testing console

The testing console is available at the bottom of the graph window. It is displayed below, collapsed:

Testing console

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:

  1. Sign in to Acquia Journey.
  2. 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 Project Editor icon icon.
  3. Select the graph you want to test, and then click Open at the bottom of the panel.
  4. Click the Arrow Maximize icon to expand the testing console.

The testing console provides the following controls:

Control Description
Start 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.
Stop Stops the execution of the current graph. When the graph is executing, this control is green; when not executing, it is gray.
Clear Logs Clears the testing console and removes information from all previous runs.
Maximize Minimize 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.

Testing settings

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:

    Standard graph test

  • If your graph has a listener attached, you will see the Test Settings dialog below:

    Graph with listener test dialog

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.

Graph with listener test

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 journey-console-expand-node.png icon in the Test Console. For each transaction, click the expand journey-console-expand-node.png 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:

Testing console output

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 journey-console-expand-node.png 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:

Testing console error output

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.

Contact supportStill need assistance? Contact Acquia Support

Acquia: Think Ahead

53 State Street, 10th Floor
Boston, MA 02109
United States
Phone: 888-922-7842

Map: Google Maps
View other locations