Skip to content

Set several options in one step #380

Closed as not planned
Closed as not planned

Description

@schlessera

Scenarios often run wp option update or wp site option update only to configure the site before the test, for example uploads_use_yearmonth_folders in 43 media-command scenarios. Each call is a full WordPress bootstrap of about 0.3 seconds, and it happens about 140 times per suite run in scenarios with several setup commands.

A step that sets a list of options at once would avoid a process per option.

Activity

  1. schlessera commented on Oct 31, 2026

    @schlessera
    MemberAuthor

    Measured in #398 against the test suites of 4 bundled commands, with three runs with and without the change each (see the pull request description for the numbers).

    Consecutive option updates during setup turned out to be rare, with 8 occurrences across the bundled commands, and a single option update costs the same with or without the step. The total Behat time changed by −1.1%, within the run-to-run variation, and the change did not cause any failures.

    Closing, as the step does not make a measurable difference. Running several setup commands in a row in a single process is covered by #378.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope:testing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions