pestphp / pestphp/pest

[4.x] --parallel does not handle multiple --exclude-group flags

Open
#1,437 7 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
11.7k
Forks
538
Avg merge
4d 11h
Merged PRs (30d)
8

Description

What Happened

./vendor/bin/pest --exclude-group='foo' --exclude-group='should exclude' --parallel

This only excludes the foo group, causing the should exclude tests to be executed.

How to Reproduce

Using Pest 3.8.3 in a clean workspace, I have modified the ExampleTest as follows:

<?php

test('example', function () {
    expect(true)->toBeTrue();
});

test('exclude me', function () {
    expect(false)->toBeTrue();
})->group('should exclude');

The test suite when run with --parallel ignores subsequent --exclude-group flags. Scenarios:

  • ./vendor/bin/pest --exclude-group='foo,should exclude' -- works fine
  • ./vendor/bin/pest --exclude-group='foo,should exclude' --parallel -- works fine
  • ./vendor/bin/pest --exclude-group='foo' --exclude-group='should exclude' -- works fine
  • ./vendor/bin/pest --exclude-group='foo' --exclude-group='should exclude' --parallel -- only excludes the foo group, causing the should exclude test to be executed
Sample Repository

No response

Pest Version

3.8.3

PHP Version

8.3.24

Operation System

Linux

Notes

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with Pest 3.8.3 using the two separate --exclude-group flags and --parallel, then compare it with the comma-separated and non-parallel commands listed above. Locate the parallel CLI option handling; done means both excluded groups are omitted in the parallel case, with the existing scenarios still passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.