-
- Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
feature/configuration/xmltype/bugSomething is brokenSomething is brokenversion/11Something affects PHPUnit 11Something affects PHPUnit 11version/12Something affects PHPUnit 12Something affects PHPUnit 12
Description
| Q | A |
|---|---|
| PHPUnit version | 11.5.24 |
| PHP version | 8.3.22 |
| Installation Method | Composer / PHAR |
Summary
a execution order of "defects,random" seems to be a useful choice, as it combines a very fast feedback loop when re-running previously failed tests while it also allows random test order to harden tests against ordering problems
Current behavior
using a phpunit.xml like
<?xml version="1.0" encoding="UTF-8"?> <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" bootstrap="./vendor/autoload.php" colors="true" executionOrder="defects,random" failOnWarning="true" failOnRisky="true" requireCoverageMetadata="true" displayDetailsOnPhpunitDeprecations="true" displayDetailsOnTestsThatTriggerDeprecations="true" displayDetailsOnTestsThatTriggerWarnings="true" cacheDirectory="./build/cache/phpunit" > works like expected, but xml validation fails, since defects,random is not a valid combiation per XSD:
see
Lines 117 to 138 in 6c7855f
| <xs:simpleType name="executionOrderType"> | |
| <xs:restriction base="xs:string"> | |
| <xs:enumeration value="default"/> | |
| <xs:enumeration value="defects"/> | |
| <xs:enumeration value="depends"/> | |
| <xs:enumeration value="depends,defects"/> | |
| <xs:enumeration value="depends,duration"/> | |
| <xs:enumeration value="depends,random"/> | |
| <xs:enumeration value="depends,reverse"/> | |
| <xs:enumeration value="depends,size"/> | |
| <xs:enumeration value="duration"/> | |
| <xs:enumeration value="no-depends"/> | |
| <xs:enumeration value="no-depends,defects"/> | |
| <xs:enumeration value="no-depends,duration"/> | |
| <xs:enumeration value="no-depends,random"/> | |
| <xs:enumeration value="no-depends,reverse"/> | |
| <xs:enumeration value="no-depends,size"/> | |
| <xs:enumeration value="random"/> | |
| <xs:enumeration value="reverse"/> | |
| <xs:enumeration value="size"/> | |
| </xs:restriction> | |
| </xs:simpleType> |
PHPStorm screenshot:
How to reproduce
change phpunit.xml to
executionOrder="defects,random"
Expected behavior
it should be a valid option to use "defects,random"
maks-rafalko
Metadata
Metadata
Assignees
Labels
feature/configuration/xmltype/bugSomething is brokenSomething is brokenversion/11Something affects PHPUnit 11Something affects PHPUnit 11version/12Something affects PHPUnit 12Something affects PHPUnit 12