Ribbon: Saving and Loading Test Data

  • Updated
Saving test data
  1. Click on the Save button
  2. Select entity JSON, Entity XML, or test scenario
  3. A 'Save Test Data' dialog box appears
Test Scenario and Entity State
Entity state has the simplicity of being an easily constructed JSON or XML document which may either be written by hand (e.g. "<Entity1><Field1>5</Field1><Field2>10</Field2></Entity1>" for XML) or serialized using end-users’ own classes.
Test scenario is a more complex structure which serializes all entities in the current rule session.
The advantages of the test scenario are:
  • It includes temporary state fields and collections which are used for both temporary data, and also cross-schema linked entities and collections.
  • It preserves multiple relationships to a single entity, so an entity that is referenced by multiple parent fields or collections is only serialized once.
  • It supports circular references, in the case where a child entity also has a link back to its parent or itself.
  • It supports serializing the state of independent rule sets.
The advantages of entity state JSON/XML are:
  • Easier to read/view/edit in an external text editor. (A test scenario may only be loaded into
    the RuleSession SDK object, or via irVerify.)
  • Only serializes the entity (and children) of interest.
NOTE: In most testing situations, it is suitable for the user to utilize test scenarios unless the data
must be consumed by a separate application.
Loading existing test data
  1. Click on the Load button
  2. A Load Test Data dialog box appears

NOTE: When loading entity XML, XML schema validation is performed by default either against the

internal schema defined by the unbound entity structure, or by the XSD the entity is bound to via the
schema end point. This validation may be disabled in the rule application settings for unbound
entities, or in the XML schema end point settings for bound entities.

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.