In this article, you will learn...

  • A range of testing strategies you can try when your app does not appear to be working as intended

When you are in the middle of an app building session, you will often find that your app logic just will not behave the way that it should.

If you feel like you are reviewing your app logic over and over again, but it still will not work, I have good news. There are a few popular ways to debug apps in real-time and zoom in on problems.

Here's the good news: when you are using the "Development Version" of an app in the Tulip Player, the app will update in real-time. So, you can make changes in the App Builder, and immediately see changes in the Tulip Player.

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 connectors within the Connectors page. Use this separate guide to test connectors.

Gateways/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 Gateway.

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 Master 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.

Did this answer your question?