Skip to content

Compose & transaction groups

A virtual service rarely mocks one thing. A “payments” mock might need a checkout endpoint, a refund endpoint, and a webhook callback, each defined once and reused across several virtual services that talk to a similar dependency. Transaction groups and composition let you build and share that structure.

Compose virtual services with groups.

A transaction group is a reusable, named bundle of transactions scoped to a workspace. It holds related endpoints (for example, “Stripe-like payments” or “Inventory API v2”) that any virtual service in the workspace can use.

  1. Open Transaction groups in the left navigation. It is a standalone library, not nested under a single virtual service, because many virtual services can reference one group at once.
  2. Click New group, give it a name and description.
  3. Add transactions to the group (method, path, and templated response) exactly as you would on a virtual service’s Transactions tab.
Transaction groups library. Each row shows how many transactions the group holds and how many virtual services reference it right now.

The group list shows a used-by count: how many virtual services include this group in their composition right now. You see how far an edit reaches before you make it. Editing a transaction inside a group updates every virtual service that references it, live.

A virtual service’s composition is the ordered list of what it serves: any mix of whole transaction groups and individually-added transactions. At serve time MaxoPerf resolves it as the union of all their transactions, deduplicated. Open a virtual service and go to its Compose tab.

Compose tab: search or ⌘K the library on the left, build the ordered composition on the right. Drag is a mouse shortcut on the same rows, and nothing requires it.

The composer is a two-pane layout: a searchable library (every transaction group and every individual transaction in the workspace) on the left, and the virtual service’s ordered composition on the right. You can add something to the composition in three ways, and they all do the same thing:

  1. Select / press Enter. Click a library row, or focus it and press Enter. The row’s main action is “add to composition.” No drag required.
  2. ⌘K (Ctrl+K). Open the command palette, type to filter across groups and transactions, and pick one.
  3. Drag. A mouse shortcut on the same library rows. Pick up a row and drop it into the composition list to reorder or add. The drag handle also supports keyboard-drag (Tab to focus it, Enter/Space to pick up, arrow keys to move, Enter/Space to drop, Escape to cancel).

Adding something already in the composition does nothing. You see a toast, with no silent failure and no duplicate entry. You can’t add a group or transaction to the same virtual service twice.

To add a new transaction without leaving the composer, use + New transaction at the top of the composition pane. It creates the transaction in the virtual service’s home group and adds it to the composition in one step, with no switch to the Transactions tab.

Composition edits stay local (a draft) until you click Save composition. Nothing goes to the server before then, with one exception: an on-the-fly transaction create saves at once together with the composition update, because the server creates both atomically.

When a virtual service’s no-match policy is Proxy to a real origin, MaxoPerf forwards unmatched requests. They appear in the Analytics tab as their own named line item (labeled Passthrough) next to your defined transactions, instead of disappearing into an “unmatched” bucket. You see what share of traffic your defined transactions cover and what still falls through to the real origin. That tells you what to mock next.