Reply-sequenced stubs

In the Recording Studio perspective, you can create a stub that can send different replies to a particular request, depending on the state of the tag data store for the stub.

Reply-sequenced stubs are generated in the Recording Studio by the same process you use to save any events to a stub. See Creating tests from recorded events. Reply-sequenced stubs are created whenever the recorded events contain replies that vary, for a particular request, during the recorded sequence of events.

When replies are sequenced, all events in the stub share a single tag data store, specifically the value of the SESSION/GROUPn/ReplyId tag. In the finished stub, reply sequencing events are displayed first, in the order that they were recorded, followed by events that uniquely map a request to a reply.
  • For hardcoded stubs, event handlers are created automatically for reply sequencing events, and a function is created to increment the SESSION/GROUPn/ReplyId tag. Duplicate messages are discarded.
  • For parameterized stubs, the Test Data Lookup action is used as a guard, matching the SESSION/GROUPn/ReplyId tag to the value in the nextReplyId column in the test data.

You can disable reply sequencing by selecting Tags > None on the Session page of the stub editor and clicking Yes in the Remove references dialog. All references to the SESSION/GROUPn/ReplyId tag are removed, and the guards for the events are changed. Any functions that were created for the events are also removed.

Feedback