Skip to content

devops: write the e2e as behat scenarios, so mysql runs the same checks - #72

Merged
landsman merged 6 commits into
mainfrom
test/behat-e2e
Sep 24, 2026
Merged

landsman merged 6 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.
CLAUDE.md, the development doc and the plugin skill still sent a reader
to tests/e2e/run.php and *.test.php files, and the pgsql seed still said
it only reached a database through make destroy. The fixture reseeds on
every run now.
@landsman landsman changed the title qa: use behat for e2e writing devops: write the e2e as behat scenarios, so mysql runs the same checks Sep 24, 2026
@landsman
landsman marked this pull request as ready for review September 24, 2026 17:38
A fresh container raced both, which a reused one never showed, so the
e2e passed locally and failed on the runner. Both images answer on the
socket from a temporary init server before the demo database or the
root password exist, and requestSubmit() let the login check read a
page mid-navigation and take it for a success.
…e today

Go 1.27 became stable and golangci-lint 2.12.2 panics analysing its
standard library, so the quality job failed on every PR with no change
to the Go code, while make qa stayed green on the pinned 1.26.5.
@landsman
landsman merged commit 80c26cd into main Sep 24, 2026
4 checks passed
@landsman
landsman deleted the test/behat-e2e branch September 24, 2026 18:09
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