Skip to content

qa: use behat for e2e writing - #72

Draft
landsman wants to merge 3 commits into
mainfrom
test/behat-e2e
Draft

qa: use behat for e2e writing#72
landsman wants to merge 3 commits into
mainfrom
test/behat-e2e

Conversation

@landsman

@landsman landsman commented Aug 3, 2026

Copy link
Copy Markdown
Owner

The old checks were 2154 lines of PHP that each booted a server, a browser and
a fixture of their own, and every assertion was an if() with a hand-written
message. What they proved was buried in how they proved it.

The same ground is now 28 scenarios in Gherkin, run against one server and one
browser with a context per scenario: 59 seconds where the old runner took three
minutes, and a failure names the scenario and the step rather than a line
number. The steps are named for what the user is doing, so a new scenario is
usually written without touching PHP at all.

Three things came over from adminer's own suite along the way, each of which
was a bug here: the version cookie, which stops Adminer asking adminer.org
about a new release while networkidle waits for it; disableOutput() on the
server, whose unread stderr pipe fills at 64 kB and takes the app down with it
mid-run; and a free-port scan, so a killed run leaves nothing behind that the
next one waits on forever.

The old *.test.php files stay for now — the MCP ones have not moved yet, and
run.php still runs all of them.
The last four, and the ones with no browser in them: an agent borrowing this
window's session, the bridge with no app behind it, the url the app records,
and the daily request log.

They read better as scenarios than the rest did, because what they assert is
already a sentence about behaviour — a write is rolled back, a closed window is
reported as one, a notification is answered with silence. The awkward part was
never the Gherkin, it was that "no browser" meant a second context: McpContext
drives curl and the classes directly, and both contexts now share one server
through e2e_fixture() rather than booting one each.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant