feat/group-filter Add PHPUnit Group Filtering & Run Support#339
Open
Jhuntenburg wants to merge 2 commits intorecca0120:mainfrom
Open
feat/group-filter Add PHPUnit Group Filtering & Run Support#339Jhuntenburg wants to merge 2 commits intorecca0120:mainfrom
Jhuntenburg wants to merge 2 commits intorecca0120:mainfrom
Conversation
…oup tests from command.
Jhuntenburg
commented
Jan 3, 2026
|
|
||
| jest.mock('child_process'); | ||
| //updated to match spawn for tests | ||
| jest.mock('node:child_process'); |
Author
There was a problem hiding this comment.
This change was because i was getting test failures from run npm jest, this change fixed on local, not sure if you were haveing the same issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add PHPUnit Group Filtering & Run Support
Summary
This PR adds support for PHPUnit test groups, enabling users to filter and run tests by group directly from the VS Code Test Explorer.
It supports both traditional
@groupannotations and PHP 8+#[Group]attributes, mapping them into Test Explorer tags and providing a new command to execute grouped tests in a single PHPUnit process.Features
Group Parsing
@groupannotations and#[Group('name')]attributesTest Explorer Integration
@phpUnitTestController:group:
Run Tests by Group
Tag Inheritance
Single Process Execution
--groupflagDemo
📽️ Video walkthrough included, demonstrating:
https://youtu.be/WJf1DIRIcNI
Files Changed
src/PHPUnit/TestParser/AnnotationParser.ts→ Added group parsing support
src/PHPUnit/types.ts→ Added
group?: string[]toAnnotationssrc/TestCollection/TestHierarchyBuilder.ts→ Added
GroupRegistrysingleton→ Assigned group tags with parent → child inheritance
src/CommandHandler.ts→ New
runByGroup()command and picker UIsrc/Handler.ts→ New
startGroupTestRun()using PHPUnit--groupsrc/extension.ts→ Command registration
package.json→ Command contribution
src/PHPUnit/TestParser/PHPUnitParser.test.ts→ Unit tests for group parsing