Copyright © TIBCO Software Inc. All Rights Reserved |
You can create data for assertion into the running engine’s Rete network during testing and debugging.You can create 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.
• Tester Data This is concept and event instance data. You create it in the TIBCO BusinessEvents Development perspective, right-click an entity and select Create Test Data. You use it in the Debug perspective: select the Rule Input View > Tester Data tab.
• 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).You can enter data in the Test Data editor 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. You can use global variables.
1. In Studio Explorer, right-click an event or concept and click Create Test Data.
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 use global variables.
3. Click Save. The entity’s test data is saved to an XML file stored within the TestData folder in the project root.
1. In Studio Explorer, expand the TestData folder in the root of the project.
2. Drill down to the test data you want to edit. The folder structure matches the project’s event and concept folder structure.
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.
1. Open the Rule Input view, if it is not already shown. To make the Rule Input View visible, do one of the following:
− 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.
1. Open the Rule Input view, if it is not already shown. To make the Rule Input View visible, do one of the following, as needed:
− 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.
3. Specify the Launch Target. This is generally the locally running engine. The other fields become active.
4. Specify an event or concept in the Entity URI field. If you specify an event, then specify the Destination URI. Specify the Rule Session (agent) to use.
− Click Save to save the input values.
− Click Load to load the input values from an existing XML file.
− Click Assert to assert the data to the running engine.
Copyright © TIBCO Software Inc. All Rights Reserved |