Issue Task Resolved

#111427Reduce repeated fixture setup in functional tests

Wouter Wolters 11/12/26, 19:41 updated 11/13/26, 14:20

Description

Several functional tests repeatedly generate the same demo data or password hashes during setup.

Reuse authentication fixtures through database snapshots, reuse generated Styleguide fixtures on SQLite while restoring their files and site configuration, and reduce password hashing cost in the reaction test configuration.

A local SQLite comparison reduced execution time for the affected 44 cases from 52.9 to 18.2 seconds, with identical assertions. The complete SQLite suite and the affected PostgreSQL tests pass.

Styleguide retains its existing setup on server databases because the testing framework currently double-encodes JSON during snapshot restoration. The measured improvement applies to these cases, not the entire suite.

Reviews 2

History 26

  1. Wouter Wolters commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-13T08:25:16+00:00" > 11/13/26, 08:25 </span>

    Applied in changeset commit:47f5c100df6e865c9ab09e378230477f96e3310c.

  2. Gerrit Code Review pushed patch set 2 for 14.3 to change 97597 status Resolved Under Review <span data-processor="relativetime" data-value="2026-11-13T14:00:25+00:00" > 11/13/26, 14:00 </span>

  3. Wouter Wolters commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2026-11-13T14:20:19+00:00" > 11/13/26, 14:20 </span>

    Applied in changeset commit:c6134c4ce4814c78944d6348bb2f17026b5f2dc8.