Testing Apps in Tulip Player
  • 20 Sep 2022
  • 9 Minutes to read
  • Contributors

Testing Apps in Tulip Player


Article Summary

Overview

In this article, you will learn:

  • How to debug different common failure modes, like Connector Functions
  • 3 approaches to test applications in Tulip Player

Sometimes the limitations of Development mode force you to test in Tulip Player. This document walks through some tips and tricks to test your Applications in Player.

How To

This guide will show a few ways to modify your app so that you can discover the bugs in your app logic.

First, use one of these resources to test other Tulip products that may be connected to your app:

Connectors

You can test SQL Connector within the Connectors page. Use this separate guide to test connectors.

Edge Devices/Factory Kit

You can use the "Factory Kit Setup" app to test your Factory Kit. Use this guide if your app is not getting any signals from your Edge Devices.

Frozen Tulip Player

If your Tulip app is frozen in the Tulip Player, and you cannot press ANY buttons, use this guide to troubleshooting the Tulip Player

Table Records

If you are trying to discover why a record is not being loaded or created successfully, make sure to restart the Tulip Player before testing the app each time.

If your issue is not related to any of the features above, read on to learn how to debug app logic.

Test 1- Using Variable Text To See Variable Values

Many issues revolve around the values of a Variable or field in a Table Record.

So, if you are wondering why a variable does not have a specific value, you can use Variable text or Table Record text to see current status.

Variable Text

To see the value of a Variable at any time, select "Variable" under the Text widget in the Tool Bar.

Then, select the Variable text on the open step. In the Context Pane under the "Widget Tab", select the Variable that you would like to investigate.

Then, after you open the step in the Tulip Player, you will be able to see the current value of the variable.

Table Record Text

To see the value of all fields in a loaded Table Record at any time, select "Table Record" under the Text widget in the Tool Bar.

Then, select the empty Table Record text on the open step. In the Context Pane under the "Widget Tab", select the Record Placeholder where the table record is loaded.

Then, after you open the step in the Tulip Player, you will be able to see the current loaded Table Record. If no values are shown under the field labels, then a record has not been load successfully.

Here's an example where no table record has been loaded:

Test 2- Showing Which Trigger Statements Are Firing

Sometimes, you may have a series of "If" statements in a Trigger, and an unexpected statement might fire upon a button press or opening of a step.

If you want to discover which trigger statements are firing, you can use the "Show Message" Trigger Action. This is very similar to using the developer console to show specific values, if you are familiar with programming.

After you find a trigger statement that should fire, add a "Show Message" statement next to it to see if it successfully runs. You can even include a Variable value in the message.

  • "Show Message" "Static Value" "text" "We successfully increased the counter."

Test 3- Create a General "Testing" Step

Sometimes, your test may not be straightforward. Or, it may need to be performed on multiple Steps.

To solve this, you can create a "Testing" step that is dedicated to showing multiple Variables and Table Records at once.

First, add a "Testing" button on the Base Layout so that the "Testing" step can be accessed from any other step.

Then, add the Trigger that allows you to go to the same testing step every time.

You can customize the testing step to your needs, but you may want to include multiple variables and table records.

Here is an example:

The example above has 5 examples of static text, 3 examples of Variable text and one example of Table Record text.


Was this article helpful?