Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

Evaluate event strategies through unit testing (8.3)

Updated on May 3, 2021

Automate Event Strategy rule testing through unit tests. By unit testing event strategies, you can detect design flaws that produce errors or return unexpected results. In addition, the option to unit test an event strategy decreases the number of resources that are required for testing coverage by eliminating the need to create a Data Flow and Data Set rules only for testing purposes.

By unit testing event strategies, you can perform the following actions to ensure that the event strategy configuration meets the design requirements:

  • Test whether the property values of emitted events meet specific criteria.
  • Verify whether the aggregation of the incoming events matches the expected results. You can assert that an event is emitted only when a specific aggregation threshold is reached (for example, only after three dropped calls are detected).
  • Affirm the number of events emitted. For example, you can check if an event strategy emits only one event that corresponds to a unique customer ID, in a specific time window.

The following example demonstrates how to create and run unit tests in event strategies. In this example, the test ensures that the following design criteria are met:

  • The number of aggregated input events per an emitted event is equal to 3.
  • The number of emitted events equals 1 for a unique customer ID.
Creating and running event strategy unit tests

For more information, see Unit testing event strategies.

  • Previous topic Increase the accuracy of text analytics models with imported feedback data (8.3)
  • Next topic Improve the management of text extraction models through entity types (8.3)

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us