[Bug]: Pest 4.0.2 stop-on-failure continues on failure instead of stop
Open
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
time vendor/bin/sail php vendor/bin/pest --stop-on-defect --stop-on-error --stop-on-failure --stop-on-risky
FAIL stocks\tests\Feature\Repository\WareRepositoryTest
PASS Tests\Unit\FactoryTest
✓ models can be instantiated 1.31s
PASS Tests\Unit\MigrationTest
✓ database tables success created 0.01s
...
FAILED stocks\tests\Feature\Repository\WareRepositoryTest >
The data provider P\stocks\tests\Feature\Repository\WareRepositoryTest::__pest_evaluable_testWareRepositoryGetAllWarehousesAsKeyValue_dataset specified for P\stocks\tests\Feature\Repository\WareRepositoryTest::__pest_evaluable_testWareRepositoryGetAllWarehousesAsKeyValue is invalid
A dataset with the name `warehouses` does not exist. You can create it using `dataset('warehouses', ['a', 'b']);`.
Test execution should stop on first failure, not after all tests are executed.
How to Reproduce
php vendor/bin/pest --stop-on-failure
Sample Repository
No response
Pest Version
4.0.2
PHP Version
8.4.11
Operation System
Linux
Notes
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running php vendor/bin/pest --stop-on-failure against a reproducible project and compare the observed execution with the expected stop-on-first-failure behavior. Trace the command's stop-on-failure handling and verify that the test run ends after the first failure rather than continuing through later tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100