Audit our custom Behat code, find slow bits and optimize them! This would most likely be in a @beforeStep, @afterStep, or @beforeScenario.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dsnopek’s picture

Status: Active » Needs review
FileSize
27.39 KB

Here is my first pass at optimizing!

EDIT: Trying on Travis-CI - this is my first attempt at running all the tests. Let's see what fails! https://travis-ci.org/panopoly/panopoly/builds/53430701

dsnopek’s picture

Random note to self: I think the code for "When I wait for live preview to finish" is broken, because it just takes too long. I suspect it's hitting the timeout, rather than actually detecting the condition.

dsnopek’s picture

FileSize
29.36 KB

Forgot to include the Panelizer default for the new test landing page content type! Here's a new patch.

EDIT: Here's the Travis-CI build: https://travis-ci.org/panopoly/panopoly/builds/53431367

dsnopek’s picture

FileSize
28.78 KB

And one last one for the night! Undid change from earlier version of this patch.

EDIT: The Travis-CI build: https://travis-ci.org/panopoly/panopoly/builds/53431587

dsnopek’s picture

Here is a new patch that make the "When I wait for live preview to finish" step actually work, rather than just waiting for the time. It required some changes to panopoly_magic, to make it actually possible to detect that the preview is reloading AND to make it's behavior more predictable (ie. I had to remove the special case for loading without delay on 'blur' because it meant that the live preview loaded twice for every field we filled in: once for filling it in and waiting, and once for the blur when we went on to the next one).

It works locally! I'll try on Travis-CI in a moment.

EDIT: Here's the build: https://travis-ci.org/panopoly/panopoly/builds/53457782

  • dsnopek committed 553be23 on 7.x-1.x
    Update Panopoly Test and Magic for Issue #2447839 by dsnopek: Audit...
dsnopek’s picture

Status: Needs review » Fixed

This is looking pretty amazing! The Behat test run time for the last run on Travis-CI was 17m21.524s for the Firefox tests. On the last successful test run on the main branch, this was 27m51.613s and I've seen it as high as 35 minutes when watching builds in the past. So, this is a pretty massive improvement!

Committed!

dsnopek’s picture

Here's all the jobs after merging this change:

https://travis-ci.org/panopoly/panopoly/builds/53460086

Only the first 5 have run so far, but it's been a long time since I've seen a job take less than 30 minutes, which is pretty sweet. :-)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.