# GitHub pull request testing before you merge

> Test a pull request against agreed requirements, keep the tested revision and native results, and review a practical checklist before merging.

Source: https://cueapril.com/use-cases/pull-request-testing
Updated: 2026-10-15
Index: https://cueapril.com/llms.txt

## What is pull request testing?

Pull request testing runs checks against the exact revision in a pull request and reports the results before anyone merges. Reviewers see what was tested, what passed or failed and what remains unchecked.

A pull request is where your team decides whether a change is ready to join the codebase. Cue April brings the tested revision, recorded outcomes and outstanding questions into that review through an approved quality workflow.

## Start with the requirement and the revision under review.

Record the base and head of the proposed change, then state what must still be true after it merges. In the owned delivery fixture, the rule is free delivery from 5000p. Testing only 4999p and 5001p misses a > boundary defect. A test at exactly 5000p connects the requirement to a failure a reviewer can reproduce.

A requirement-linked regression assertion

```javascript
// Requirement: delivery is free from £50.
assert.equal(deliveryPence(5000), 0);
```

## Run checks and preserve their native evidence.

The downloadable example exercises this requirement with Node tests, fast-check, Cucumber and Stryker. Its verification command deliberately expects the negative cases to fail and the corrected cases to pass. The archive contains the source, package lockfile and recorded native reports. These executions are local teaching material, not a run on GitHub or Cue April’s hosted product. The [separate product-engine evidence](/product-run) shows actual Cue April engines executing an owned invoice fixture locally, with revision identity and native outputs.

Run locally or adapt to your CI job with Node 24

```bash
node --version
npm ci --ignore-scripts
npm run verify
```

Actual local evidence for the fixture

```text
Known bad boundary: fast-check counterexample [5000]
Gherkin: 1 failed scenario before the fix, 0 after
Boundary mutation: survived weak tests, killed by boundary assertion
Corrected property: 1000 generated cases passed
```

## Make the review record easy to inspect.

A PR comment or check summary should identify what ran and point to evidence, so a reviewer does not have to reconstruct the run from a green icon. Do not copy private test source or credentials into a public discussion. Keep artifacts accessible only to the people who should see them.

- Name the tested commit and whether it is the PR head or a test merge commit.
- Link the requirement and selected files, methods and input scope.
- Report passing, failing, blocked and unfinished work separately.
- Attach native outputs, counterexamples and reproduction commands where available.
- Identify what changed after a fix and retain the previous failure.

## Check that success still applies to the latest change.

A successful run on an earlier commit does not establish the state of a new one. GitHub explains that required checks must pass for the relevant latest revision; where a test merge commit has status, that merge result takes precedence over head-only status. [Read GitHub’s status-check guidance](https://docs.github.com/en/pull-requests/how-tos/merge-and-close-pull-requests/troubleshooting-required-status-checks). A skipped or neutral check can satisfy some GitHub rules, so reviewers should still inspect what actually executed.

## Use this checklist at the merge decision.

The reviewer decides whether the evidence addresses the risk in the change. Repository rules govern what can merge, and a test report does not replace those rules.

- The evidence names the revision GitHub is currently evaluating.
- The agreed behaviour includes important boundaries and denied actions.
- The tests were actually executed in the intended environment.
- Failures have a reproduction path and incomplete checks remain visible.
- The regression assertion fails against the known defect and passes after the fix.
- Changes since the last run have been checked, including changes to test configuration.
- An authorised reviewer has considered the remaining risk.

## Bring testing evidence into your Cue April workflow.

Cue April’s implemented GitHub integration can publish an App-owned evidence comment for an approved PR run, linking the tested revision to protected results. Setup confirms repository permissions, supported suites, qualified execution and agreed scope. Watched changes can reuse standing approved intent where configured; your repository rules and reviewers retain the merge decision. [Read the workflow](/how-it-works) or [compare evaluation options](/pricing).

## Reproduce the example

A fictional delivery rule with a deliberately seeded boundary defect. These examples were executed locally. They contain no customer data, AI calls or hosted Cue April execution.

Verified 2026-10-15 with Node 24.21.0, fast-check 4.10.2, Stryker 10.0.0 and Cucumber 13.3.0.

[Download runnable examples](https://cueapril.com/examples/testing-business-rules.zip)

[Read source and recorded results](https://cueapril.com/examples/testing-business-rules/index.html)

## Primary documentation

- [GitHub: required status checks and tested revisions](https://docs.github.com/en/pull-requests/how-tos/merge-and-close-pull-requests/troubleshooting-required-status-checks)
- [GitHub: protected branches and required checks](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches)

By Cue April. Updated 2026-10-15.

## Questions

### Can new changes start testing automatically?

Configured watched changes can reuse explicitly approved standing intent when admission requirements are satisfied. Initial setup and changes to the relevant scope or authority still need review.

### Will the quality agent merge the pull request?

The evidence integration publishes testing information and a scoped recommendation. Repository rules and your authorised reviewers govern the merge decision.

### How do you test a pull request before merging?

Run the checks against the exact commit in the pull request and review the outcomes, and any scope that did not run, in the pull request itself. Cue April’s GitHub integration posts an evidence comment that names the tested revision and links to the full report.

## Related

- [Unit testing](https://cueapril.com/testing/unit-testing): Unit testing explained, with examples. Run your Jest or Vitest suites against a pinned code revision and inspect the native results and remaining gaps.
- [Testing AI-generated code](https://cueapril.com/guides/testing-ai-generated-code): Review AI-generated code with an independent requirement, a runnable boundary example, actual fast-check and Stryker results, and a before-merge checklist.
- [Agentic testing](https://cueapril.com/guides/agentic-software-testing): Agentic testing explained: approved intent, coordinated test methods, reproducible findings and evidence for a human release decision.
