Test application changes using a test environment

Test application changes using a test environment

Requirement

Workflows in an app have to be tested to ensure it is working as expected, before releasing the updates to users.

Use Case

An order management app contains two forms, one to store products details, and the other to store order details. A workflow is added to send SMS messages to customers when a new order is placed. Before publishing SMS workflow - related changes to users, we use the Environments feature to test if the SMS is being triggered as expected.

See how it works

Steps to follow

1. An order management app contains the following forms and fields:

Form

Form Link Name

Field Type

Field Name

Field Link Name

Products

Products

Single Line

Product Name

Product_Name

Currency

Price

Price

Orders

Orders

Lookup (Products)

Product

Product

Number

Quantity

Quantity

Currency

Amount

Amount

Name

Customer Name

Customer_Name

Phone

Customer Phone

Customer_Phone

 
2. Let's create a connection with Twilio to send SMS to customers when an order is placed.
Navigate to  Microservices , and click  + Create New
 
3. Click Create under Connections.
 
4. Click Twilio.
 
5. Enter a name for the connection. The connection name is used in the send sms workflow. To keep it simple, we will use the same Twilio account credentials in all the environments. Click Create And Authorize.
 
6. Enter the required details of your Twilio account from which the message will be sent, and click Authorize.
 
7. Toggle Connection Access to On for the application.
 
8. Now , let's add a workflow to send SMS using the Twilio connection when customers place an order. Before that, let's add this application to Environments, so that we can test the workflow before users can use it.
Navigate to Environments , and click Add Application.
 
9. Select the app and click Enable in the popup.
 
10. The application will be listed in Environments section. To add a workflow, edit the app by clicking Create & Edit under Development.
Note: Applications are edited in the development environment only. Development environment creation may take a while based on the app's components.
 
11.  Create workflow with the following details :
We are selecting Form Event as "Successful form submission" because the SMS has to be triggered when an order is submitted.
 
12. Click Add New Action > Notification > Send SMS , and save details as shown below.
 
13. Now let's publish the changes to Stage environment where we can test if the SMS is being triggered as expected.
Navigate to Environments , and click Publish to stage .
 
14. Select the app and click Proceed .
 
15. Select all the changes and click Proceed .
 
16. Enter version details and click Publish .
Note: It may take a while for the app to be published to Stage environment based on the app's components.

17. Once the app is published, click Access under Stage to test the app in Stage mode.
 
18.  Once testing is complete, changes can be <published to Production> for end users.

See how it works

Points to note

  • In this tutorial we have added an app to Environments after the app was created. It is possible to enable Environments during the app creation as well.
  • The D eluge task send sms can also be used to trigger SMS.