3 min. reading time

Testing complex state machines can be cumbersome as many steps need to be repetitively performed until a state of interest is reached. To overcome this, the YAKINDU Statechart Tools Professional Edition provides a new feature called Simulation Snapshots which allows users to resume the simulation directly at the point of interest.

What are Simulation Snapshots?

A simulation snapshot stores the complete state of a running statechart simulation. It comprises all active states, variable values and time events’ statuses. A snapshot can be taken at any time during a simulation and restored later. This allows the user to resume the simulation directly at the point of snapshot creation. Restoring snapshots works as long as your semantic changes to the state machine model do not break the restoration process, such as deleting a previously active state.

Take a Shortcut with Snapshots

When testing a complex state machine, it might take several manual steps to reach a situation of interest. Often, a series of events needs to be manually invoked and variables manipulated to ensure the simulation takes the desired transition path. Doing this repetitively is no fun and just steals your precious time.

With Snapshots, the execution state of a simulation can be stored for later use. Once you have reached a testing hotspot in your statechart, just take a snapshot. After further testing the state machine, you can restore the previously stored state, for example, in order to test a different transition path. This can be a huge time-saver!

A snapshot not only stores variable values and active states but also the status of time triggers. Consider a time trigger "after 30s". Taking a snapshot after 20 seconds means that after restoration you only need to wait for the remaining 10 seconds until the time trigger is pulled.

The Snapshot view helps to keep track of all created snapshots. Every snapshot is tagged with a timestamp and can be labelled individually. To check the content of a specific snapshot, you have two options:

  1. A tree view lists all variables and their values (left screenshot)
  2. An image view provides a screenshot of the state machine with highlighted active states (right screenshot)

Snapshot_Details.png

Your Feedback Counts

You can try the YAKINDU Statechart Tools Professional Edition for free. Your feedback is important as we continously strive to improve the tool! Please send us your comments via e-mail or the Mail Support function in the tool.

Download and try  YAKINDU Statechart Tools

Comments