Template Tester
The Platform Template Tester is an interactive tool that provides a way to easily debug and test Losant’s Template Engine while building workflows.
Looking for the Docs Template Tester? You can find it in our Documentation. The Platform Template Tester is a tool that helps you within the platform, while the Docs Template Tester is a tool that helps you learn and practice with examples.
Accessing the Platform Template Tester
You can access the Platform Template Tester through the following mechanisms:
Workflow Editor Toolbar
Select the Template Tester Icon that is located in the Workflow Engine toolbar:
Workflow Trigger Editor
Select a Trigger in your Workflow to open the Trigger Editor Panel and select the Template Tester Icon in the Example Payload configuration:
Workflow Debug Messages
While debugging a Workflow, click on the Debug tab to view the Debug Message Logs and select the Template Tester Icon displayed inline with the Debug Message.
Input Types
You can use the Template Tester with live payloads from your running workflow in the following ways:
String Template
Choose “String Template” from the “Input Type” select menu. Enter your string template into the “String Template” field. Observe the results located in the “Output” field.
Expression
Choose “Expression” from the “Input Type” select menu. Enter your expression into the “Expression” field. Observe the results located in the “Output” field.
You may cast your result to a boolean value by clicking on the “Cast the result to a boolean (true/false)” checkbox.
Payload Path
Choose “Payload Path” from the “Input Type” select menu. Enter your payload path into the “Payload Path” field. Observe the results located in the “Output” field.
JSON Template
Choose “JSON Template” from the “Input Type” select menu. Enter your JSON Template into the “JSON Template” field. Observe the results located in the “Output” field.
Payload Types
After selecting the type of input, you may choose:
- one of your workflow’s triggers.
- a recent debug message.
- a custom payload object.
Workflow Trigger
You must have one or more Trigger in your workflow. Access the Platform Template Tester with either of the following methods:
Select “Workflow Trigger” from the “Choose a Payload Type” select menu if it is not already selected.
When you have more than one Trigger in your workflow you may select the Trigger’s payload from the “Choose a Trigger” select menu.
You can now test against the Trigger Payload using any of the following methods:
Recent Debug Messages
You must have one or more Debug Message in your workflow. Access the Platform Template Tester with either of the following methods:
Select “Recent Debug Message” from the “Choose a Payload Type” select menu if it is not already selected.
Select your debug message from the “Choose a Debug Message” select menu.
You can now test against the Debug Message Payload using any of the following methods:
Custom Payloads
It is not required to have any Triggers or Debug Messages in your workflow. However, it certainly helps create a “Starting Point” for your Custom Payload if any of them exist in your workflow. Access the Platform Template Tester with either of the following methods:
You can either select “Custom” from the “Choose a Payload Type” select menu or you can click on the “Make changes” link in the Payload section.
Create or edit your payload within the “Payload” field.
You can now test against the Custom Payload using any of the following methods:
Was this page helpful?
Still looking for help? You can also search the Losant Forums or submit your question there.