Loading entities and submitting events by using TestDriver

You can run tests on a solution by submitting events to an Insight Server from a test client. You create a test client project and optionally files to store your entity and events definitions, and then load and submit them by using a test driver instance.

The TestDriver class is the main entry point for testing a solution. TestDriver provides model factory methods to load entities and create events. You can add methods to load entities and submit events by using the TestDriver instance.

Tip: In between your test runs, you might want to reset the server. If you do not reset the server, the previous state of the agents remains in operation. Agents are not removed by the system so that in production rules can be updated in a continuous fashion. When you debug a solution however, a single test is sufficient and in most cases you reset the server between tests to get a fresh start.

You can also reset the entire state of a solution by calling the TestDriver resetState method, or with the REST API delete method. Entities are not deleted when you reset the state, everything else is cleared.