Tutorials / Features

Compare two builds

Find out what a new build changed in the way your app talks to its servers: calls that now fail, fields lost or retyped, endpoints added or dropped, slower or bigger responses.

5 minutesapp · command line · agentssince v0.4.2

You need

  • Two builds of the same app, for example 1.0 from the store and 2.0 from your branch.
  • A connected device.
  • One flow you can repeat on both builds, such as browse, add to cart, check out.

Record the old build

Install the old build, clear the list, and walk through the flow. Then save it with File → Share Session… (⇧⌘S), for example as acme-shop-1.0.lynkei.

Record the new build

Clear the list, install the new build and repeat the same steps. Keep it as the current traffic, or save it too.

Compare them

  1. Choose Help → Compare Two Builds…, or … → Compare two builds… in the toolbar.
  2. Pick Before and After. Sessions you saved or opened lately are listed with Use as Before and Use as After; Choose file… opens any .lynkei or HAR file, and Use current traffic takes what's in the list.
  3. Comparing staging with production? Switch on Match by path only so different hosts line up.
  4. Press Compare.
Compare two builds screen with acme-shop-1.0 as Before and acme-shop-2.0 as After, chosen from the recent sessions list

Read the findings

Compare findings: 4 breaking, 1 warning, 1 new, 1 gone; the cart lost its currency field and product prices changed from number to string
Two builds of a demo shop app. Breaking findings come first.
SeverityWhat triggers it
BreakingA call that now fails, a response field that's gone, a field that changed type, a different response type.
WarningSlower by over 30% and 100 ms, bigger by over 30% and 2 KB, called twice as often, or no longer called.
InfoNew endpoints, new fields and query parameters.

Calls are grouped into endpoints: ids in paths are folded (/products/42 becomes /products/{id}) and GraphQL operations are kept apart. Copy report copies the findings as text.

In a script or CI

The command line gives the same report and exits with code 2 when something is breaking, so it can fail a build. Each file can be a .lynkei session, a HAR file, or the output of lynkei search --json.

Terminal · real output from the demo builds
$ lynkei compare acme-shop-1.0.lynkei acme-shop-2.0.lynkei
Acme Shop 1.0 → Acme Shop 2.0
5 calls in 5 endpoints → 5 calls in 5 endpoints
4 breaking · 1 warnings · 1 new · 1 gone · 0 unchanged

[BREAKING] GET 192.168.0.182/v2/cart
   ✗ Response no longer has: currency

[BREAKING] GET 192.168.0.182/v2/products
   ✗ Response types changed: items[].price (number → string)
   · Response now also has: items[].badge, items[].description
   · New query parameters: sort
   ! Slower: typical 0 ms → 607 ms
   ! Bigger response: 185 B → 11.7 KB

[BREAKING] POST 192.168.0.182/v2/checkout
   ✗ Now failing: 503 (1 of 1 calls); before: 200
   ✗ Response no longer has: orderId, status

[warning ] GET 192.168.0.182/v2/banner
   ! Not called in the new capture (was 1 call(s))

[info    ] GET 192.168.0.182/v2/recommendations
   · New endpoint, 1 call(s)

Options: --ignore-host matches by path only, --all lists unchanged endpoints too, --json prints machine-readable findings.

Good to know

Compare looks at the shape of what the server does, never at values, so different accounts and timestamps don't show up as changes. Run the same flow on both builds: an endpoint you visited only once shows as new or gone.