How to: Use the Server Side Execution Testing Page

Overview

The Server Side Execution Testing page simulates a submission’s remote execution. This page gives you the freedom to test data without impacting the module or submission Also known as Record Data. Submission data consists of information saved by Unqork components. View submission data by using the angular command, or in Record Collections.. You can also choose to overwrite existing data with new data. This testing page is a great way to test your module while you build. It also lets you mimic a remote execute without configuring a Plug-In component.

The Debugger tool is a part of the Server Side Execution Testing page. It shows every step of your module’s remote execution. Change a value and the Debugger shows you how that change affects the rest of the application

We use the terms server-side execute and remote execute the same way. They both mean that Unqork executes the module on the back-end and on the server.

This tool is only available in non-production environments.

How the Configuration Works

For this how-to guide, your end-user End-users, also known as Express Users, are the individuals accessing an application through Express View. In most cases, end-users are the customers using the product. navigates to a front-end module in Express View Express View is how your end-user views your application. Express View also lets you preview your applications to test your configuration and view the styling. This is also the view your end-users will see when interacting with your application. After configuring a module, click Preview in the Module Builder to interact with the module in Express View.. Your end-user inputs insurance information into the module using Radio Buttons and Text Field components. When saved, the module's Plug-In component fires, calling the back-end module:

1. The front-end module's radioToSend Radio Buttons icon Radio Buttons component response populates the destinationFieldForRadio iconHidden component in the back-end module
2. The back-end module's ruleDecideCalc Decisions Component icon Decisions component fires the appropriate calculation based on the radioToSend Radio Buttons icon Radio Buttons response. 
3. The calcHouse, calcCar, and calcBoat  Calculator components' result populates the insuranceRate iconHidden component.
4. The front-end module’s pluginRemoteExecutePart1 Plug-In retrieves the insuranceRate data from the back-end module
5. The data populates the destinationForRateReturnedFromPart1  Text Field component in the front-end module.

Your end-user then receives their insurance rate.

Because you’re mimicking a remote execute, use the Debugger tool on the back-end module. The Debugger lets you see how the module behaves as you input data. When testing API calls, you can also use the Service Logs tool to test and log each response.

To complete this how-to guide, you need:

Copy and paste the module definitions of each lab into your UDesigner modules. To learn how to copy/paste module definitions, visit our How to: Copy and Paste Module Definitions article.

Accessing the Server Side Execution Testing Page

To run the Debugger tool, open the Server Side Execution Testing page.

To open the Server Side Execution Testing page:

1. Click the link to open the EnablementLab_RemoteExecute1_BackEnd module in the Module Builder: https://training.unqork.io/#/form/5d9e06f2b5871a004223b54e/edit.
2. At the top right of the page, click the Server Side Execution button.

You might need to enter your credentials to access the Server Side Testing Tools.

When you arrive on the page, you see the Request section and the Response and Debugger tabs. In the Request section of the page, enter the information to run your PUT API APIs (application programming interfaces) are a set of protocols and definitions developers use to build and integrate application software. APIs act as the connective tissue between products and services. request. Running the Put request will upload the data from an existing module.

Server Side Execution Testing

When you open the Testing page, your module’s ID populates in the Module ID field. You can then customize the settings as you see fit.

1. Enter the Submission ID for the submission where you want to run test data. Or, leave this field blank to create a new submission.
2. Under Data, select if you want to  Enter as Key-Value or Enter as JSON. Then, enter the data that you want to test.

Click Add Row if you need to add more data when selecting Enter as Key-Value. Or, click Delete to remove data.

3. Under Flags, select your desired options.
4. Under Metadata, select if you want to  Enter as Key-Value or Enter as JSON. Then, enter the metadata that you want to test.

Click Add Row if you need to add more data when selecting Enter as Key-Value. Or, click Delete to remove metadata.

5. Click Execute. The module executes with new data based on your chosen preferences.

Here's a closer look at each setting on the Server Side Execution Testing page:

Request

When you arrive on the page, the module ID automatically populates. This module ID is all you need to test data with the Debugger tool. Here's how the Server Side Execution Testing page looks:

Static image showing the Server Side Execution Testing page.

There are a variety of ways to test your module's data. The following settings help you create your test:

Setting Description

Module ID

The ID for the module you want to run server-side.

The Module ID is the only requirement for running a server-side test.

Submission ID

The submission ID of the submission data Also known as Record Data. Submission data consists of information saved by Unqork components. View submission data by using the angular command, or in Record Collections. you want to test.

Entering a submission ID here requires an Edit Submission function from an Initializer to trigger the process. The submission ID will remote execute, and then call the submission. To avoid this issue, enter the submission ID in the Data Key or Data Value fields below. Entering the submission ID as a Data Key/Value triggers a New Submission.

Data

If you choose to test specific data, you have the option to enter key/value pairs or JSON.

 Enter as Key-Value

Selecting this option lets you enter a key and value to test.

Data Key

The Property ID for the data that you're testing.

Data Value

The Data value you want to insert into the submission.

Delete

The Delete button removes the Data Key and Data Value fields from that row.

Add Row

This button adds another Data Key and Data Value field so you can enter more key/value pairs.

 Enter as JSON

You can easily handle larger calls by entering them between curly braces in the JSON field. This field is helpful if you want to test data types that aren't strings.

You can also use this field to test inputs copied from your DevTools Console, request bodies, or service logs. Copy your object from the source. Then, paste it into the JSON field and execute a test.

Request Info

Setting Description

Request URL

The request URL from your module. It populates automatically as: /fbu/uapi/forms/{moduleId}/execute.

Request Body

The request body from your module.

Advanced Settings

Setting Description

Flags

There are three flag options for signaling a specific function on the Testing page.

Save

This option saves data to Unqork’s database.

  • If you enter a Submission ID and click Save, the data you enter overwrites that submission data.
  • If you click Save with no Submission ID, Unqork creates a new submission ID from your data.
  • Leave this box clear to test data without saving it to the database.

By default, this setting is ☐ (unchecked).

Validate Data

This options shows errors for invalid data entries.

By default, this setting is ☐ (unchecked).

Load Submission Data First

This option waits for submission data to load before executing any of the module's logic.

By default, this setting is ☐ (unchecked). However, it's best practice to select this setting.

Metadata

If you choose to test specific metadata, you have the option to enter key/value pairs or JSON.

 Enter as Key-Value

Selecting this option lets you enter a metadata key and value to test.

Data Key

The Property ID for the metadata that you're testing.

Data Value

The metadata value you want to insert into the submission.

Delete

The Delete button removes the Metadata Key and Metadata Value fields from that row.

Add Row

This button adds another Metadata Key and Metadata Value field so you can enter in more key/value pairs.

Enter as JSON

You can easily handle larger calls by entering them between curly braces in the JSON field. This field is helpful if you want to test data types that aren't strings.

You can also use this field to test inputs copied from your DevTools Console, request bodies, or service logs. Copy your object from the source. Then, paste it into the JSON field and execute a test.

Service Logs Testing

If you're testing an API server side execute, you can run your tests on the Module Builder using the Service Logs pane. You can also open the Server Side Testing page from here by clicking the Open SEE Debugger button.

To open the Service Logs pane: 

1. Open your module in the Module Builder.
2. Click the ··· (ellipsis) button.
3. Select Service Logs.The Service Logs pane appears to the right of the Module Builder.

The Server Side Execute tool the Service Logs panel operates the same way as the Response tab in the Server Side Execution testing page. Click Run Now to initiate the test and view the result.

Static image showing the Service Logs testing panel after successfully running a test.

Service logs also allow you to store and render your tests in a dashboard. For more information on Service Logs, visit our Service Logs Dashboard Tool article.

 

Overview

The Server Side Execution Testing page simulates a submission’s remote execution. This page gives you the freedom to test data without impacting the module or submission Also known as Record Data. Submission data consists of information saved by Unqork components. View submission data by using the angular command, or in Record Collections.. You can also choose to overwrite existing data with new data. This testing page is a great way to test your module while you build. It also lets you mimic a remote execute without configuring a Plug-In component.

The Debugger tool is a part of the Server Side Execution Testing page. It shows every step of your module’s remote execution. Change a value and the Debugger shows you how that change affects the rest of the application

We use the terms server-side execute and remote execute the same way. They both mean that Unqork executes the module on the back-end and on the server.

This tool is only available in non-production environments.

How the Configuration Works

For this how-to guide, your end-user End-users, also known as Express Users, are the individuals accessing an application through Express View. In most cases, end-users are the customers using the product. navigates to a front-end module in Express View Express View is how your end-user views your application. Express View also lets you preview your applications to test your configuration and view the styling. This is also the view your end-users will see when interacting with your application. After configuring a module, click Preview in the Module Builder to interact with the module in Express View.. Your end-user inputs insurance information into the module using Radio Buttons and Text Field components. When saved, the module's Plug-In component fires, calling the back-end module:

1. The front-end module's radioToSend Radio Buttons icon Radio Buttons component response populates the destinationFieldForRadio iconHidden component in the back-end module.
2. The back-end module's ruleDecideCalc Decisions Component icon Decisions component fires the appropriate calculation based on the radioToSend Radio Buttons icon Radio Buttons response.
3. The calcHouse, calcCar, and calcBoat  Calculator components' result populates the insuranceRate iconHidden component.
4. The front-end module’s pluginRemoteExecutePart1 Plug-In retrieves the insuranceRate data from the back-end module.
5. The data populates the destinationForRateReturnedFromPart1  Text Field component in the front-end module.

Your end-user then receives their insurance rate.

Because you’re mimicking a remote execute, use the Debugger tool on the back-end module. The Debugger lets you see how the module behaves as you input data.

To complete this how-to guide, you need:

Accessing the Server Side Execution Testing Page

To run the Debugger tool, open the Server Side Execution Testing page.

To open the Server Side Execution Testing page:

1. Click the link to open the EnablementLab_RemoteExecute1_BackEnd module in the Module Builder: https://training.unqork.io/#/form/5d9e06f2b5871a004223b54e/edit.
2. At the top right of the page, click the Server Side Execution button.

You might need to enter your credentials to access the Server Side Testing Tools.

When you arrive on the page, you see three sections: Request, Response, and Debugger. In the Request section of the page, you see PUT and GET Request Methods. A PUT API APIs (application programming interfaces) are a set of protocols and definitions developers use to build and integrate application software. APIs act as the connective tissue between products and services. request updates data and a GET API request retrieves data. Because the Server Side Execution Testing settings change depending on the Request Method, let's look at those settings separately.

PUT Server Side Execution Testing

Request

The PUT Request Method is the default. When you arrive on the page, the module ID automatically populates. This module ID is all you need to test data with the Debugger tool. Here's how the Server Side Execution Testing page looks:

There are a variety of ways to test your module's data. The following settings help you create your test:

Setting Description

Module ID

The ID for the module you want to run server-side.

The Module ID is the only requirement for running a server-side test.

Submission ID

The submission ID of the submission data Also known as Record Data. Submission data consists of information saved by Unqork components. View submission data by using the angular command, or in Record Collections. you want to test.

Entering a submission ID here requires an Edit Submission function from an Initializer to trigger the process. The submission ID will remote execute, and then call the submission. To avoid this issue, enter the submission ID in the Data Key or Data Value fields below. Entering the submission ID as a Data Key/Value triggers a New Submission.

Flags

There are three flag options for signaling a specific function on the Testing page.

Save

This option saves data to Unqork’s database.

  • If you enter a Submission ID and click Save, the data you enter overwrites that submission data.
  • If you click Save with no Submission ID, Unqork creates a new submission ID from your data.
  • Leave this box clear to test data without saving it to the database.

By default, this setting is ☐ (unchecked).

Validate Data

This options shows errors for invalid data entries.

By default, this setting is ☐ (unchecked).

Load Submission Data First

This option waits for submission data to load before executing any of the module's logic.

By default, this setting is ☐ (unchecked). However, it's best practice to select this setting.

Data

If you choose to test specific data, you have the option to enter key/value pairs or JSON.

Enter as Key-Value

Selecting this option lets you enter a key and value to test.

Data Key

The Property ID for the data that you're testing.

Data Value

The Data value you want to insert into the submission.

Add Data Value

This button adds another Data Key and Data Value field so you can enter more key/value pairs.

Delete

The Delete button removes the Data Key and Data Value fields from that row.

Enter as JSON

You can easily handle larger calls by entering them between curly braces in the JSON field. This field is helpful if you want to test data types that aren't strings.

You can also use this field to test inputs copied from your DevTools Console, request bodies, or service logs. Copy your object from the source. Then, paste it into the JSON field and execute a test.

Metadata

If you choose to test specific metadata, you have the option to enter key/value pairs or JSON.

Enter as Key-Value

Selecting this option lets you enter a metadata key and value to test.

Metadata Key

The Property ID for the metadata that you're testing.

Metadata Value

The metadata value you want to insert into the submission.

Add Metadata Value

This button adds another Metadata Key and Metadata Value field so you can enter in more key/value pairs.

Delete

The Delete button removes the Metadata Key and Metadata Value fields from that row.

Enter as JSON

You can easily handle larger calls by entering them between curly braces in the JSON field. This field is helpful if you want to test data types that aren't strings.

You can also use this field to test inputs copied from your DevTools Console, request bodies, or service logs. Copy your object from the source. Then, paste it into the JSON field and execute a test.

Request Info

Expanding Request Info shows the Request URL and Request Body.

Request URL

The request URL from your module. It populates automatically as: /fbu/uapi/forms/{moduleId}/execute.

Request Body

The request body from your module.

When you open the Testing page, your module’s ID populates in the Module ID field. You can then customize the settings as you see fit.

1. Enter the Submission ID for the submission where you want to run test data. Or, leave this field blank to create a new submission.
2. Under Flags, select your desired options.
3. Under Data, select if you want to Enter as Key-Value or Enter as JSON. Then, enter the data that you want to test.

Click Add Data Value if you need to add more data when selecting Enter as Key-Value. Or, click Delete to remove data.

4. Under Metadata, select if you want to Enter as Key-Value or Enter as JSON. Then, enter the metadata that you want to test.

Click Add Metadata Value if you need to add more data when selecting Enter as Key-Value. Or, click Delete to remove metadata.

5. Click Execute. The module executes with new data based on your chosen preferences.

GET Server Side Execution Testing

Request

Let's look at the settings that you can configure if you select the GET Request Method. After selecting GET from the Request Method, the Module Name field displays in place of the Module ID. Here's how the Server Side Execution Testing page looks after selecting the GET Request Method:

It's important to note that the Debugger is not available for the GET request method. But, like the PUT request, there is other information you can gain from your module. The following settings help you manipulate the information:

Setting Description

Module Name

The title for the module you want to run server-side.

The Module Name is the only requirement for receiving a server-side response with the Get request method.

Submission ID

The submission ID of the submission data you want to test.

Entering a submission ID here requires an Edit Submission function from an Initializer to trigger the process. The submission ID will remote execute, and then call the submission. To avoid this issue, enter the submission ID in the Data Key or Data Value fields below. Entering the submission ID as a Data Key/Value triggers a New Submission.

Flags

There are four flag options for signaling a specific function on the Testing page.

Save

This option saves data to Unqork’s database.

  • If you enter a Submission ID and click Save, the data you enter overwrites that submission data.
  • If you click Save with no Submission ID, Unqork creates a new submission ID from your data.
  • Leave this box clear to test data without saving it to the database.

By default, this checkbox is clear.

Validate Data

This option shows errors for invalid data entries.

By default, this checkbox is clear.

Load Submission Data First

This option waits for submission data to load before executing any of the module's logic.

By default, this checkbox is clear. However, it's best practice to select this setting.

Show Operations

This option shows the progress of each operation that runs in your module. It creates timestamps of the starting and ending times of your operations.

By default, this checkbox is clear.

Data

If you choose to test specific data, you have the option to enter key/value pairs or JSON.

Data Key

The Property ID for the data that you're testing.

Data Value

The Data value you want to insert into the submission.

Add Data Value

This button adds another Data Key and Data Value field so you can enter more key/value pairs.

Request Info

Expanding Request Info shows the Request URL and Request Body.

Request URL

The request URL from your module. It populates automatically as: /fbu/uapi/forms/{moduleId}/execute.

When you open the Testing page, your module’s name populates in the Module Name field. You can then customize the settings as you see fit.

1. Enter the Submission ID for the submission where you want to run test data. Or, leave this field blank to create a new submission.
2. Under Flags, select your desired options.
3. Under Data, enter the data that you want to test.

Click Add Data Value if you need to add more data. Or, click Delete if you want to remove data.

4. Click Execute. The module executes with new data based on your chosen preferences. 

After clicking Execute, you see a Response tab

Resources