Skip to content

test: speed up and slim down the integration suite#815

Merged
lucatume merged 6 commits into
masterfrom
refactor/integration-suite-speedup
Jul 4, 2026
Merged

test: speed up and slim down the integration suite#815
lucatume merged 6 commits into
masterfrom
refactor/integration-suite-speedup

Conversation

@lucatume

@lucatume lucatume commented Jul 4, 2026

Copy link
Copy Markdown
Owner

No description provided.

lucatume added 5 commits July 4, 2026 20:57
Stacked expectException calls left every assertion after the first dead:
ScaffoldedTest salts getters (plus an expectedException typo that made the
last check a no-op), MultisiteTest state transitions, WPQueriesTest failing
assertions. Replaced with loops/assertFails so each check runs; this exposed
four wrong assertNotQueriesByStatementAnd* expectations now pointed at the
entities that do produce SELECT queries.

SingleMultisiteConversionTest siteurl-conversion test asserted nothing and
could not fail; it now expects the WPDieException the flow actually raises.
Removed a dead duplicated config block in WPTestCaseStrictTest.
Read-only getter tests rebuilt an identical scaffold/configure/install per
test. Each class now lazily builds one shared fixture (plus a variant where
3+ tests share the same custom config) and constructs a fresh state object
per test; mutating tests keep their own installation.

SingleDirectoriesTest is deleted: Single and Configured share
ConfiguredStateTrait, and every getter+config combination it asserted is
covered install-free in ConfiguredTest; the installed-state coverage moved
to one consolidated test on SingleRuntimeTest's cached fixture.

Local wall time: MultisiteTest 35.7s -> 20.2s, SingleRuntime+SingleDirectories
28.9s -> 8.1s, ConfiguredTest 13.2s -> ~9s, ScaffoldedTest 5.2s -> ~2.7s.
WpTestsConfigTest, WPLoaderLoadOnlyTest, WPLoaderRelativeConfigTest,
WPLoaderScaffoldedInstallationCustomLocationsTest and SqliteDatabaseTest
never load WordPress or touch a database server; they were misfiled in the
integration suite.
- WpbrowserTest: plugin/theme/bedrock scaffold pairs differing only by entry
  filename or recommended-setup answer merged (8 methods -> 4); snapshot
  files renamed to the provider dataset naming.
- SymlinkerTest: relative/absolute path twins and the two no-cleanup tests
  merged; the 5x duplicated vendor fixture array extracted to one helper.
- LoadSandboxTest: the three not-installed variants merged into one provider.
- WPCLITest: seven single-flag builder tests and four config-throw variants
  merged into two provider tests (~200 duplicated lines removed).
- DbExportTest: standalone MySQL/SQLite dump tests folded into DbImportTest
  round-trips, which already exported as a precondition; export exit code
  now asserted there.
- SingleConstructionTest: install-again/scaffold-again twins merged into one
  test that exercises both throws.
Integration tests use per-file sharding and Random::dbName() databases, so
workers do not collide. Cuts the ~8 minute serial run to the slowest shard.
@lucatume lucatume self-assigned this Jul 4, 2026
@lucatume lucatume merged commit 42ecbe4 into master Jul 4, 2026
52 checks passed
@lucatume lucatume deleted the refactor/integration-suite-speedup branch July 4, 2026 19:25
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