Skip to content

Test Cases & Merge Gate

When you open a merge request, Specor can generate test cases that describe exactly what the change should do — written as Given/When/Then scenarios, derived from the real diff, and traced back to your acceptance criteria. Marking those scenarios pass or fail forms a merge gate: a merge with failing or unaddressed tests can’t be quietly waved through.

Where test cases come from

Specor doesn’t use a generic template. It reads the actual diff between the branch and its target and writes scenarios for the behaviour that changed:

  • One scenario per acceptance criterion on the affected Features, so coverage traces to a written requirement
  • Blast-radius coverage — Specor pulls in the two-hop neighbourhood of every changed node (the Flows, Rules, and Features connected to what you touched) and generates regression scenarios for them, not just the headline change

Generating test cases is a generative AI action, so it draws on your plan’s AI credits (unlike the always-free proactive checks).

Gherkin scenarios

Each test case is a plain-language Given / When / Then scenario:

Scenario: Guest checkout under the limit
Given a cart totalling $150
When the guest pays without an account
Then the order is accepted and a confirmation email is sent

Because they’re written in business language, scenarios are readable by everyone reviewing the merge — not just engineers.

The merge gate

Open the Test Cases tab on a merge request to see every generated scenario. For each one, mark the result:

ResultMeaning
PassThe behaviour was verified against the build
FailThe behaviour is broken or missing
PendingNot yet checked

The results roll up into a gate on the merge. A merge with failing or pending scenarios is flagged and blocked until they’re resolved — so nothing lands untested.

Marking tests from your AI tools

Test cases are exposed over the MCP server, so a developer can review and mark scenarios from Cursor, Claude Desktop, or any MCP client without leaving their editor. The merge gate updates live as results come in.

The Flow agent complements test cases by catching structural defects before they ever reach a test run — a Flow with no terminal step, an unreachable Step, or an invalid transition. Fix those first; then verify behaviour with test cases.

Tips

  • Generate after the diff settles. Regenerate test cases once the branch is close to final so scenarios reflect the real change.
  • Add the edge cases the model missed. Generated scenarios are a strong first draft — extend them with the cases only you know about.
  • Keep merges small. A tighter diff means a smaller blast radius and a faster, clearer gate.