Testing and Debugging Projects : Creating and Working With Tester Data

Creating and Working With Tester Data
You can create tester data for assertion into the running engine’s working memory during testing and debugging.
You can create tester data while you are working in the debug perspective. You can also create and save test data ahead of time and save it in your project for later use.
You can create two kinds of tester data:
Test Data  This is concept and event instance data. This kind of data is created in Studio Explorer (in the BusinessEvents Development perspective). It can then be edited by clicking it in Studio Explorer or by clicking it in the Rule Input View > Tester Data tab (in the Debug perspective).
Rule Data  This is data directly provided as rule input. It is created and edited in the Rule Input View > Rule Data tab (in the Debug perspective).
How you use tester data depends on what aspect of a project you want to test or debug.
You can enter tester data for event payloads, and for concept, event and scorecard properties, including properties that are primitive types, array types, contained concepts, and reference concepts. If the concept, event or scorecard properties are associated with a domain model, then the test data gets populated with the values in the domain model.
Working with Tester Data
To Create Concept and Event Instance Test Data
1.
The Test Data editor appears showing the event or concept properties as column headers.
2.
In the Test Data editor, click Add to add rows for new instances. You can add your own unique extId values to the test data input, as needed.
You can also remove existing rows by selecting one or more rows and clicking Remove.
3.
Click Save. The entity’s test data is saved to an XML file stored within the TestData folder in the project root.
The /TestData folder is the default location (see Reference to Tester Preferences).
To Edit Test Data for Concepts and Events in Studio Explorer
To add more data or edit some data that you created earlier, do the following.
1.
In Studio Explorer, expand the TestData folder in the root of the project.
The /TestData folder is the default location (see Reference to Tester Preferences).
2.
3.
Double-click the name of the test data file you want to edit. The test data editor opens. Add, remove, and edit rows of test data as desired.
Test data filenames use the format eventName.eventtestdata and conceptName.concepttestdata.
To Edit Concept and Instance Test Data in the Rule Input View
1.
Select the Debug perspective: Select Window > Open Perspective, or click the Open Perspective () button). Then select Other > Debug. The views associated with the Debug perspective open.
In the Window menu, click Show View > Other. Expand TIBCO BusinessEvents, and select Rule Input. Click OK.
2.
For each concept or event for which you created test data, you see one row showing the project path to that concept or event.
3.
The Test Data editor appears, showing the rows of test data already created.
Working with Rule Data
To Create, Save Rule Data
1.
Select the Debug perspective: Select Window > Open Perspective, or click the Open Perspective () button). Then select Other > Debug. The views associated with the Debug perspective open.
In the Window menu, click Show View > Other. Expand TIBCO BusinessEvents, and select Rule Input. Click OK.
2.
3.
4.
Click Save to save the input values.
You can reuse these saved values for repetitive tests.
Click Load to load the input values from an existing XML file.
Click Assert to assert the data to the running engine.