|
|
Testing Format Definitions
Once you have built a format definition, you can test it using the built-in test feature of Format Builder. The test feature parses and reformats data as a validation test and also generates sample binary or XML data. Using the Tester, you can make sure the message formats you build with Format Builder produce the expected results. The Tester uses the runtime WLXT Java class to perform the test translation.
This section discusses the following topics:
Running the Tester
To run the tester:
Note: To run the Tester, you must have a message format document open in the Format Builder.
Note: The Tester works with the currently loaded message definition document.
Figure 3-1 Format Tester Dialog
Field |
Description |
---|---|
MFL Document |
Displays the name of the message format definition currently loaded in Format Builder. |
Binary |
|
Load |
Allows you to select the binary data file you want to work with. |
Save |
Allows you to save the binary data to a file. |
Generate |
Automatically generates binary test data based on the current message format definition. |
Clear |
Clears the data from the display area. |
Display Area |
Displays the results of loading or translating a file. You can also enter your own data or modify data you have entered. Note: Clicking the right mouse button in this display area opens a shortcut menu. From this menu, you can choose the Cut, Copy, or Paste commands. These commands allow you to cut or copy text displayed in this area and paste it in another location within this display area. |
Action Buttons |
|
To XML |
Translates the binary data in the currently loaded file to XML format, based on the current message format definition. |
To Binary |
Translates the XML data in the currently loaded file to binary format, based on the current message format definition. |
Debug |
Select this option if you want to display the actions the Tester performs during a translation. |
XML |
|
Load |
Allows you to select the XML data file you want to work with. |
Save |
Allows you to save the XML data to a different filename. |
Generate |
Automatically generates XML test data based on the current message format definition. |
Clear |
Clears the data from the display area. |
Display Area |
Displays the results of loading or translating a file. You can also enter your own data or modify data you have entered. Note: Clicking the right mouse button in this display area opens a shortcut menu. From this menu, you can choose the Cut, Copy, or Paste commands. These commands allow you to cut or copy text displayed in this area and paste it in another location within this display area. |
Debug |
|
Debug Display Area |
Displays the actions being performed by the Tester during a translation. |
Debugging Formats
The following steps illustrate using the Tester to debug a message definition that does not translate correctly.
Note: You can leave the Tester dialog box open while you modify the Message Format from within Format Builder. Any changes to the message definition are automatically used by the Tester.
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|