|
| Summary: |
Group the functional tests that build the same fixture |
| Issue Type: |
Task |
| Assignee: |
Unassigned |
| Components: |
Application |
| Created: |
30/Aug/26 21:27 |
| Priority: |
Major |
| Reporter: |
Vincent Massol |
| Description: |
Problem Several tests of ReleaseNotesIT build the same fixture under a different product name, and each one pays for its own page creations and page loads. Measured on the current master (Failsafe report, one run):
- ReleaseNotesIT wall time: 187.4s
- sum of the 12 test methods: 69.0s
- the rest, 118.4s (63%), is the @UITest fixture โ Docker container, XWiki start, XAR install, browser, teardown โ which is created once per test class and is already shared by every test
So grouping tests can only attack the 69s, and only the fixture-building part of it. Per test: contributorsList 11.2s, homeListsReleaseNotesAndChanges 10.5s, getChangesComparisonFiltersIncludeTheBoundaryVersion 7.8s, contributorsListEscapesWikiSyntax 6.1s, unknownDisplayerNameFallsBackToTheDefaultDisplayer 5.9s, contributorsListEditFlow 5.8s, changeNumberingIgnoresContributors 4.3s, configureFromAdministration 3.9s, gridDisplayerRendersEachChangeAsACard 3.3s, reportForwardsOnlyItsOwnFilterParameters 3.3s, createReleaseNoteFromTemplate 3.2s. What to do
- Group the contributors tests and the change-numbering test (27.4s together). contributorsList, contributorsListEditFlow, contributorsListEscapesWikiSyntax and changeNumberingIgnoresContributors all build the same fixture under four different products: a release note carrying the macro, plus a Contributors child entry. One release note whose content holds both the contributors and the changes macro can serve all four โ assert the warning, click "Add contributors", save a list mixing case and wiki syntax, assert the ordering, the escaping and the hidden child page, then fire the useradd action on the same page and assert Entry001. Expected saving: ~14s.
- Group the displayer and report tests (12.5s together, the two grid tests having already been merged by
RN-82). unknownDisplayerNameFallsBackToTheDefaultDisplayer, reportForwardsOnlyItsOwnFilterParameters and gridDisplayerRendersEachChangeAsACard each create a product and a change only to render them. One product with the two changes the grid test already needs can feed all three, and the report test needs no product of its own since ReleaseNotes.Code.Report takes the product from the request. Expected saving: ~7s.
Leave alone:
- homeListsReleaseNotesAndChanges filters its Live Data and asserts a row count of 1, so it wants a version that nothing else touches; the coupling costs more than the ~1s it saves.
- configureFromAdministration builds no fixture at all.
- createReleaseNoteFromTemplate mutates the shipped template page and has to stay isolated.
A test must keep saying what it asserts: group tests only where the merged test states one coherent behaviour, and keep the assertion messages that name the behaviour being checked. Notes Grouping buys about 20s of the 187s (~11%). The two structural levers are worth more and are not part of this issue:
- Every new @UITest class pays the 118s fixture again, so keeping all the functional tests in ReleaseNotesIT is worth more than any merging inside it.
- Assertions that only look at the HTML a wiki page renders belong in a PageTest (the module already has HomeCustomReportPageTest): no Docker, no browser. Only the assertions about geometry or about a click-through genuinely need the browser.
|
|