• 沒有找到結果。

Click Run test from this activity

在文檔中 TIBCO Flogo® Enterprise User's Guide (頁 135-138)

Testing Flows from the UI

3. Click Run test from this activity

The execution begins from the current activity. The logs are also displayed only for the current activity and subsequent activities in the flow.

Once the execution starts from a tile, you cannot access preceding tasks executed in the previous runs. The previous activities are greyed out. If you want to run the flow from a previous activity, you must launch a new test.

Logging information

As the activities are executed, the runtime engine logs for the activities are displayed in the Logs output window. The format of the logs is similar to the logs displayed while running an app binary.

To copy these logs, you can click Copy logs.

You can also switch from the Flow logs view to the activity data view by clicking Activity data.

Configuring a Launch Configuration

When you click a Launch Configuration name, its mapper opens to its right. The mapper displays the input tree in the left pane.

Procedure

1. Expand the input tree.

2. Click an element to add a value for the element.

3. Enter the value for that element in the text box to its right.

When entering values for the elements, be aware of the following:

The input tree for a Launch Configuration mapper displays the input you configured in the Flow Inputs & Outputs accordian tab for blank flows. For flows created with a trigger, it displays the output schema of the trigger.

For flow inputs that contain only single objects, you must enter the input values at the root level. The example below shows how to enter the values for a single object, Customer:

When mapping an array of objects, the input must be provided at the array root level, which means that you must provide input for all objects in the array by clicking on the root of the array. You cannot configure the input at the array element level. In the example below, Customer is an array of objects. Each object within the Customer array contains ID, Phone, and Name elements. When providing values for Customer, you cannot give the input at the element (ID, Phone, or Name) level.

Doing so does not specify the index of the Customer object for which you are assigning the value(s).

Hence, you must assign the value to the whole Customer object. Since the Customer array has multiple objects, assign values to each object in the Customer array by separating the objects with a comma delimiter. The array size will be determined based on the number of objects for which you provide values. In the example below, the array size is two since there are two objects for which values have been provided.

4. Click Next.

The mapper performs validations to ensure the validity of the JSON structure and also validates that you have entered values for all elements that are marked as required in the schema. If there are any errors in your input, when you click Next, the mapper displays a list of errors.

In your test environment, only the validation errors related to invalid JSON structure will prevent you from proceeding with your testing. Errors pertaining to missing values for required elements serve as a warning, but allow you to proceed with your testing. This is because it is possible that an element that is marked as a required field in the schema may not have been used in the activity at the time of testing. In that case, the element is not needed for the flow to run. But in the production environment, your app will not run successfully until you provide input values for all elements marked as required in your schema.

Exporting a Launch Configuration

There may be occasions when you want to use the same test data configurations for testing multiple flows.

You have the option to create a Launch Configuration that contains this data in one flow, export the Launch Configuration, then import it into each of the other flows. The ability to export a Launch Configuration is particularly useful when the data set is very complex. In such a scenario, you can export a Launch Configuration, import it into another flow and test the flow with the imported Launch Configuration.

Reusing a Launch Configuration by exporting and importing it saves you the time and effort needed to create a separate Launch Configuration for each flow.

To export a Launch Configuration, follow these steps:

Procedure

1. In the Flow Tester, hover your mouse cursor to the extreme right of the Launch Configuration name that you want to export.

2. Click the Export Launch Configuration ( ) icon.

A file with the name <flow-name>_<Launch Configuration-name>.json gets downloaded to your

Downloads directory. You can import this file into another flow and use the Launch Configuration that you just exported. Refer to Importing a Launch Configuration for details on how to import a Launch Configuration.

The Launch Configuration name is not preserved, so the imported Launch Configuration is given a default name of "Launch Configuration x" where x stands for the next number in the series of existing Launch Configurations. For example, if you have two existing Launch Configurations in the flow, the imported Launch Configuration is named Launch Configuration 3. You have the option to edit the name to make it more meaningful.

Importing a Launch Configuration

Launch Configurations are stored as JSON files, so when you export a Launch Configuration, you export its JSON file. You import the Launch Configuration that was exported from another flow by importing the JSON file of the Launch Configuration into the flow.

The Launch Configuration name is not preserved, so the imported Launch Configuration is given a default name of "Launch Configuration x" where x stands for the next number in the series of existing Launch Configurations. For example, if you have two existing Launch Configurations in the flow, the imported Launch Configuration is named Launch Configuration 3. You have the option to edit the name to make it more meaningful.

To import a Launch Configuration, follow this procedure:

Prerequisites

You must export the Launch Configuration you want to import and have its JSON file accessible before you follow the procedure below.

If this is the first Launch Configuration

1. If this is the first Launch Configuration in the flow (no existing Launch Configurations), click Test on the

在文檔中 TIBCO Flogo® Enterprise User's Guide (頁 135-138)