Learn more about template management:
There are many formats of message/requests used in various systems when they communicate with one another. In some cases, we may want to test such a system with synthetic messages to understand how it responds to certain error conditions.
This solution allows a user to take a JSON (i.e. an endpoint swagger spec) or xml message (i.e FCA data reg specifications) and from it create a template file that can then be used to generate significant amounts of messages with the same structure as the input file but with synthetic data replacing the original data. These synthetic messages can then be injected into to a test environment to be used in testing.
Generate XML or JSON messages for a particular situation for the purpose of testing.
For instance a user can take an xml message such as this MLA-1b income statement
They can then generate synthetic data for the values shown for the purposes of testing. For example, a user could generate a message with negative total expenditure, which is a fictitious situation. They could then send this message and validate the system to see if it has detected this error condition.
Installing the Solution
Step 1 – add the catalogue entries to the server
The components required for this solution are included in the core TDA installation, ensure your server is up-to-date or contact support. Make sure the files:
Both Exist on your VIP Server
These contain the entries required to expose the solution components to modeler. The so-called 'solution catalogue entries'.
To install please select Profile/ Automation Servers/ your_server_name then choose add from file.
The add file to server process
Complete this for both files.
If you go to the VIP Executor menu option, you should see the following:
Figure 1: The menu items to parse input files and create templates.
This allows you to submit stand-alone jobs to the VIP Executor engine
The solution is composed of 2 steps that are performed sequentially. It assumes that the XML input file or JSON files are well-formed, an error will be thrown if malformed XML or Json is added. For the rest of this example, we will use a JSON example, but the process is identical for XML.
Step 1 – Creating the Control file
Click the play button on either option 1 (JSON) on Figure 1 and add the example file. This will parse the file and create a control file that's downloadable as a CSV.
Step 2 – Change the Control File
An Example JSON message and control file are shown in Figures 2 and 3 respectively.
Figure 2: Example JSON
Figure 3: Control File for JSON Message. Here the ColumnName is the name of the JSON Value, the Default column is the current value of the JSON in the message, MakeParameter specifies if we want to make data to be used in the template and JPath is the JPath to the value.
The only columns that should be edited by the user are "Default" and "MakeParameter". The Default column is populated initially by the value in the message, but can be changed to a VIP function like RandomHelper.GetRandomInt() … etc.
Step 3 – Create Template from Control File and Message
Click Option 3 on Figure 1. Then enter the JSON example from Step 1 and the Control File created in Step 2. At this point, the UI should look similar to this:
After clicking Execute, a template file is created. An example is shown below in Figure 4.
Figure 4: Template created from using the control file in Figure 3.
Figure 4 shows how the user has replaced the values in the JSON with placeholders for Made data. This is configured by changing the MakeParameter column to 'TRUE' in the control file in Figure 3.
This Template file can then be used to generate multiple messages following the structure in Figure 4 but with different data values.
TEST MODELLER SOLUTIONS AND COMPONENTS TEMPLATE MANAGEMENT