Repository navigation
Automate manual regression plan: 54/60 rows as Playwright tests on MySQL 8 CI + coverage matrix - #341
Conversation
…and coverage matrix Co-Authored-By: Achal Channarasappa <achal.channarasappa@cognition.ai>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
| for (const m of src.matchAll(/\btest(?:\.\w+)?\(\s*['"`](MT-\d{3})\b([^'"`]*)['"`]/g)) { | ||
| const list = found.get(m[1]) ?? []; | ||
| list.push({ file: relative(repoRoot, join(testsDir, file)), title: `${m[1]}${m[2]}` }); | ||
| found.set(m[1], list); | ||
| } |
There was a problem hiding this comment.
🟡 Disabled tests retain false coverage
When a plan test becomes test.skip or is commented out, scanSpecs still counts its ID as automated. The coverage check passes even though Playwright no longer tests that row.
Learn more
The coverage check uses scanSpecs to decide whether each manual-plan row has an executable Playwright test. It searches raw source, so test.skip('MT-022 ...') and a commented-out test('MT-022 ...') both register as coverage. The coverage gate only checks whether that ID was found, so it passes after the test is disabled.
Example: A developer skips MT-022 during debugging and commits the change. Playwright does not run the deposit test, but npm run coverage:check still reports the row as automated.
Recommended fix: Discover runnable tests through Playwright's test listing or another structured source instead of raw source matching. Exclude skipped and fixme tests, and verify that each plan ID has at least one executable test.
Was this helpful? React with 👍 or 👎 to provide feedback.
| env: | ||
| SPRING_DATASOURCE_URL: jdbc:mysql://127.0.0.1:3306/bankappdb?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC | ||
| SPRING_DATASOURCE_USERNAME: root | ||
| SPRING_DATASOURCE_PASSWORD: Test@123 | ||
| MVNW_REPOURL: https://maven-central.storage-download.googleapis.com/maven2 |
There was a problem hiding this comment.
|
Closed by demo/seed-situation.sh: demo_qa seed branch was reset. |
Summary
Automates
qa/manual-test-plan.csvas Playwright tests (e2e/) and runs them in GitHub Actions against a MySQL 8 service container. 54 of 60 rows are automated; 6 are not, and each of the 6 has a reason inqa/not-automated.csv.test('MT-031 Overdraw is rejected', ...)). Each test creates its own uniquely named customers, so tests share no state, need no DB reset, and run in parallel. Rows that say "After MT-036" repeat the MT-036 setup instead of relying on test order.e2e/scripts/coverage.mjsbuildsqa/coverage-matrix.mdfrom the plan, the spec titles andqa/not-automated.csv.--checkfails CI in these cases: a plan row has no test and no reason, a row has both, an ID isn't in the plan, or the committed matrix is out of date.--results results.jsonwrites per-row pass/fail to the job summary..github/workflows/e2e.yml):mirror.gcr.io/library/mysql:8.0service,./mvnw -s demo/maven-settings.xml verify(socontextLoadsalso runs against MySQL), start jar,npx playwright teston Chromium. Report, traces, results.json and app log are uploaded as artifacts.Assumptions where the plan was not specific (also noted as comments in the specs):
transferAmountchecks funds before it looks up the recipient, so with a $0 balance the error would be "Insufficient funds" instead of the "Recipient account not found" this row is testing..navbar-brandtext ("Wells Fargo").validityflag is set and no POST to the endpoint goes out.Not automated (expected result is missing or untestable; no expected result was invented):
Also observed (not tested, no expected result in the plan):
/images/wells-fargo-logo.pngreturns 302 to/loginfor logged-out visitors, so the logo doesn't load on the login and register pages.Note:
demo/setup-demo.shchecks thate2e/is absent ("BEFORE state"), so that check fails on this branch by design.Local run against MySQL 8: 54 passed in about 20s. Two deliberate mutants (removing
required, wrong expected balance) both failed, so the assertions do catch breakage.Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/0c42a18bdfdb467e87909110e8ca065e
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/0c42a18bdfdb467e87909110e8ca065e?variant=devin
Requested by: @achalc
Devin Review