Wrong call to phpunit when asking for test groups
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 24
### What happened
The call to phpunit when asking for test groups isn't correct so that it reports that there is no group.
Updating the call would fix the issue.
### Language / Project Type / NetBeans Component
PHP, testing with phpunit
### How to reproduce
I setup a PHP project to run tests with PHPUnit
In the phpunit config (project properties / Testing / PHPUnit) I check "Ask for test groups before running tests".
I also have "test project using phpunit command only" set. As well as the XML file, and path to phpunit.
netbeans will invoke phpunit with
```
"/usr/bin/php" ".../vendor/bin/phpunit" "--colors" "--configuration" ".../application/tests/phpunit.xml" "--list-groups" "."
```
Output it
```
PHPUnit 10.5.40 by Sebastian Bergmann and contributors.
Available test group(s):
Done.
```
The part `"--list-groups" "."` should actually be `"--list-groups"` (ie. without the `"."` part).
When I run the command myself without the `"."` part), phpunit returns the list of groups, otherwise it doesn't.
```
"/usr/bin/php" ".../vendor/bin/phpunit" "--colors" "--configuration" ".../application/tests/phpunit.xml" "--list-groups"
```
```
PHPUnit 10.5.40 by Sebastian Bergmann and contributors.
Available test group(s):
- default
- html5
```
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Debian 12
### JDK
Java: 17.0.13; OpenJDK 64-Bit Server VM 17.0.13+11-Debian-2deb12u1
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
Contributor guide
Research direction
Start by tracing the NetBeans PHP testing code that constructs the PHPUnit command for the “Ask for test groups before running tests” option. Compare the generated command with the two examples in the issue, remove the trailing project path only for group listing, and verify that PHPUnit reports the configured groups.
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
- Mostly clear
- Newbie friendliness
- 45/100