[go: up one dir, main page]

Page MenuHomePhabricator

[LEX] [TECH] Speed up Cypress test suite for Wikibase Lexeme
Closed, ResolvedPublic

Description

Porting the dormant Selenium test suite to Cypress has a direct impact on the running time of the quibble-vendor-mysql-php74-noselenium job, which is currently our longest-running CI job. That puts these tests on the critical path for CI.

Concretely, the tests currently take 263 seconds (4.4 mins) to run, increasing the total runtime to 1004 seconds (16.7 mins).

Investigate ways to reduce the runtime for these tests. Possible approaches include:

  • Installing a cypress plugin for parallel testing (see T370033)
  • Merging separate test-cases into a single long test case (per cypress best practices)
  • Caching / sharing created objects between tests where possible.

This activity should be timeboxed to 2 days.

Event Timeline

Change #1073489 had a related patch set uploaded (by Audrey Penven; author: Audrey Penven):

[mediawiki/extensions/WikibaseLexeme@master] [WIP] Speed up Cypress tests

https://gerrit.wikimedia.org/r/1073489

Change #1074981 had a related patch set uploaded (by Audrey Penven; author: Audrey Penven):

[mediawiki/extensions/WikibaseLexeme@master] [WIP] Speed up Cypress tests by caching entities

https://gerrit.wikimedia.org/r/1074981

Change #1075051 had a related patch set uploaded (by Audrey Penven; author: Audrey Penven):

[mediawiki/extensions/WikibaseLexeme@master] [WIP] Parallelize Cypress tests

https://gerrit.wikimedia.org/r/1075051

Change #1073489 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Speed up Cypress tests by combining tests

https://gerrit.wikimedia.org/r/1073489

Change #1074981 abandoned by Audrey Penven:

[mediawiki/extensions/WikibaseLexeme@master] [WIP] Speed up Cypress tests by caching entities

Reason:

Combining tests was a better way of achieving entity-reuse.

https://gerrit.wikimedia.org/r/1074981

Change #1075051 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Parallelize Cypress tests

https://gerrit.wikimedia.org/r/1075051

Hm, it looks like the effect gets lost in the noise of the rest of the build time :/

Before the speedup changes:

https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php74-selenium/39045/console : SUCCESS in 14m 09s
https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php74-selenium/39256/console : SUCCESS in 15m 36s

Combine tests:

https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php74-selenium/39879/console : SUCCESS in 15m 54s
https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php74-selenium/39940/console : SUCCESS in 16m 32s

Parallelize tests:

https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php74-selenium/41688/console : SUCCESS in 14m 34s
https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php74-selenium/41698/console : SUCCESS in 15m 46s

Unfortunately, all the builds are gone already, so we can’t look at how much of that time was spent in WikibaseLexeme’s Cypress tests specifically.

But I’m guessing we should still close this task? (We’ve at least spent the full timebox at this point, I think.)

Yeah - we're through the timebox, so we got what we got. It would have been good to check that this wasn't a regression, but I don't imagine that's the case.