Problem/Motivation
We have test classes with many test methods that makes the testing slow.
Methods are not parallelisable and the setup happens again and again. A class is fully sequential.
Proposed resolution
Either split the class into multiple or make a single testmethod that calls such as...
function testCollection() {
doTestContinuousJobForm();
doTestAddContinuousLink();
... and many more
}
As a result the setup only happens once for testCollection.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | tmgmt-test-splitup-2685049-6-interdiff.txt | 31.21 KB | berdir |
| #6 | tmgmt-test-splitup-2685049-6.patch | 51.57 KB | berdir |
| #4 | tmgmt-test-splitup-2685049-4.patch | 21.99 KB | berdir |
Comments
Comment #2
miro_dietikerBTW latest test time currently is took 7 min 8 sec on d.o infra and locally in full around 30mins... :-)
Comment #3
berdirSpecifically, we should split tests by dependencies. For example, TmgmtUiTest currently depends on tmgmt_content and ckeditor for a single/few tests each. The combination of those two adds around 6 additional modules to each test, that need to be enabled and installed.
Move continuous and ckeditor dependant tests both to a separate class.
Comment #4
berdirThe ckeditor dependency was actually completely bogus, we didn't rely on this in any way.
Moved all continuous tests to a separate test class. Cleaned up the test a bit so we need fewer logins.
Also fixed the random fail that #2668384: Validate buttons don't show a success message introduced because randomString() sometimes spits out tags ;) That makes this a major bug.
Comment #5
miro_dietikerAlmost.
Looks kinda good, but that diff is really hard to review. :-)
Comment #6
berdirYes, this is impossible to review, I know.
Fixed the @file, core actually recently changed the coding standard to no longer require that: #2304909: Relax requirement for @file when using OO Class or Interface per file
The previous patch was already 2m faster, 5 instead of 7. This moves another method, testReview(), to the new TmgmtUiReviewTest. Also removed the ckeditor dependency there.
Will commit once green, that's enough for now.
Comment #7
berdirAnother 20s or so faster, down to exactly 5m. And now LocalTranslatorTest is the slowest test, so making this one faster for now doesn't bring more benefits for testbot. We should probably open another one for LocalTranslatorTest, maybe also the content entity UI test.
Committed.