TEST-INFRA: [ci-execution-time] Make the number of parallel test processes configurable #2301

Closed
opened 2026-04-03 13:25:38 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: chore/ci-configurable-test-processes
  • Commit Message: chore(ci): make parallel test process count configurable via TEST_PROCESSES env var
  • Milestone: v3.2.0
  • Parent Epic: #1678

Background and Context

The noxfile.py currently defaults to a maximum of 2 processes for parallel execution of unit and integration tests. This is a conservative setting that may not fully utilize the resources of modern CI runners, which often have a higher core count. This can lead to longer than necessary test execution times.

Proposed Solution

Introduce an environment variable (e.g., TEST_PROCESSES) to control the number of parallel processes used by behave-parallel and pabot. The _default_processes() function in noxfile.py should be updated to use this environment variable if it is set.

This change will allow the CI environment to be configured for optimal test parallelization based on the available resources of the runner, without affecting the conservative default for local development.

Acceptance Criteria

  • The _default_processes() function in noxfile.py reads the TEST_PROCESSES environment variable when set.
  • If TEST_PROCESSES is not set, the existing default (2 processes) is preserved for local development.
  • The CI configuration sets TEST_PROCESSES to an appropriate value for the CI runners.
  • Documentation is updated to describe the new environment variable and its effect.

Subtasks

  • Update _default_processes() in noxfile.py to read the TEST_PROCESSES environment variable
  • Add input validation: ensure TEST_PROCESSES is a positive integer when set; raise a clear error otherwise
  • Update CI configuration to set TEST_PROCESSES to an appropriate value for CI runners
  • Update documentation (README or relevant docs) to describe the TEST_PROCESSES environment variable
  • Tests (Behave): Add scenarios covering TEST_PROCESSES set to a valid value, unset, and invalid value
  • Verify coverage >= 97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly (chore(ci): make parallel test process count configurable via TEST_PROCESSES env var), followed by a blank line, then additional lines providing relevant implementation details.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly (chore/ci-configurable-test-processes).
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

Automated by CleverAgents Bot
Supervisor: Test Infrastructure | Agent: ca-new-issue-creator

## Metadata - **Branch**: `chore/ci-configurable-test-processes` - **Commit Message**: `chore(ci): make parallel test process count configurable via TEST_PROCESSES env var` - **Milestone**: v3.2.0 - **Parent Epic**: #1678 ## Background and Context The `noxfile.py` currently defaults to a maximum of 2 processes for parallel execution of unit and integration tests. This is a conservative setting that may not fully utilize the resources of modern CI runners, which often have a higher core count. This can lead to longer than necessary test execution times. ## Proposed Solution Introduce an environment variable (e.g., `TEST_PROCESSES`) to control the number of parallel processes used by `behave-parallel` and `pabot`. The `_default_processes()` function in `noxfile.py` should be updated to use this environment variable if it is set. This change will allow the CI environment to be configured for optimal test parallelization based on the available resources of the runner, without affecting the conservative default for local development. ## Acceptance Criteria - The `_default_processes()` function in `noxfile.py` reads the `TEST_PROCESSES` environment variable when set. - If `TEST_PROCESSES` is not set, the existing default (2 processes) is preserved for local development. - The CI configuration sets `TEST_PROCESSES` to an appropriate value for the CI runners. - Documentation is updated to describe the new environment variable and its effect. ## Subtasks - [ ] Update `_default_processes()` in `noxfile.py` to read the `TEST_PROCESSES` environment variable - [ ] Add input validation: ensure `TEST_PROCESSES` is a positive integer when set; raise a clear error otherwise - [ ] Update CI configuration to set `TEST_PROCESSES` to an appropriate value for CI runners - [ ] Update documentation (README or relevant docs) to describe the `TEST_PROCESSES` environment variable - [ ] Tests (Behave): Add scenarios covering `TEST_PROCESSES` set to a valid value, unset, and invalid value - [ ] Verify coverage >= 97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly (`chore(ci): make parallel test process count configurable via TEST_PROCESSES env var`), followed by a blank line, then additional lines providing relevant implementation details. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly (`chore/ci-configurable-test-processes`). - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.2.0 milestone 2026-04-03 13:25:57 +00:00
Author
Owner

Closing as duplicate of #2333.

This issue ("Make the number of parallel test processes configurable") is a subset of #2333 ("Investigate and increase test parallelism"), which already includes configurability as part of its scope. Consolidating to avoid duplicate work.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Closing as duplicate of #2333. This issue ("Make the number of parallel test processes configurable") is a subset of #2333 ("Investigate and increase test parallelism"), which already includes configurability as part of its scope. Consolidating to avoid duplicate work. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#2301
No description provided.