Skip to main content

Branch a test โ€” fork the first N steps

Often several tests share the same beginning โ€” log in, navigate to a section, open a form โ€” and then diverge. Branch from here forks the common prefix into a brand-new session so you don't re-record (or copy-paste) the shared steps.

How to use itโ€‹

  1. Open the Events tab and right-click the step you want to branch at.
  2. Choose "Branch from here (steps 1โ€ฆN)".
  3. A dialog asks for the new session's name (defaults to <name>-branch). Enter one and click Create branch.

Branch from here โ€” name the new session and click Create branch

4. A new `.trq` containing **steps 1โ€ฆN** is created in the same folder and is selected + revealed in the explorer. Open it and use **Resume** (or **Record step(s) here**) to record the divergent steps.

The new branch session contains the copied prefix; use Resume to record the rest

The original session is untouched โ€” branching only ever copies the prefix.

Exampleโ€‹

You have checkout.trq: login โ†’ open cart โ†’ enter address โ†’ pay. You also need a test for the empty-cart path, which shares the first two steps:

checkout.trq
1 login
2 open cart
3 enter address
4 pay

Right-click step 2 ("open cart") โ†’ Branch from here (steps 1โ€ฆ2) โ†’ name it empty-cart. You get:

empty-cart.trq
1 login
2 open cart โ† shared prefix, copied
โ† now Resume and record "assert cart is empty"

How it helpsโ€‹

  • No duplicated recording. Re-use a verified login/setup prefix across many tests instead of recording it (and maintaining it) N times.
  • Safe experimentation. Try an alternate path on a copy without risking the working original.
  • Pairs with Resume. Branch to get the prefix, then Resume to record the rest.

Branch copies the session's config (viewport, locale, fake media, โ€ฆ) and re-numbers the copied events. The new name can't contain / (it's created in the same folder as the source).