drevops / behat-format-progress-fail
Behat output formatter to show progress as TAP and fails inline.
Package info
github.com/drevops/behat-format-progress-fail
pkg:composer/drevops/behat-format-progress-fail
Requires
- php: >=8.1
- behat/behat: ^3.29.0
Requires (Dev)
- behat/mink: ^1.13.0
- dealerdirect/phpcodesniffer-composer-installer: ^1.2.0
- drevops/behat-phpserver: ^2
- drevops/phpcs-standard: ^0.7
- drupal/coder: ^8.3.31
- ergebnis/composer-normalize: ^2.50.0
- escapestudios/symfony2-coding-standard: ^3
- phpstan/phpstan: ^2
- phpunit/phpunit: ^11.5.55
- rector/rector: ^2
- squizlabs/php_codesniffer: ^3
- symfony/process: ^6 || ^7.0 || ^8.0
README
Behat Progress Fail Output Extension
Warning
This package is deprecated. It is supported until 31 December 2026, after which it will be marked as abandoned and will receive no further releases, fixes, or compatibility updates.
Behat now does this natively. The built-in progress formatter gained an inline_failures option that prints each failed, pending or undefined step as it happens, instead of holding everything back until the end-of-run summary. That is exactly what this extension was built for, so it has served its purpose. Upgrade to the latest Behat and use the core formatter instead - see Migrating to Behat core.
Behat output formatter to show progress as TAP and failures inline.
..
--- FAIL ---
Then I should have 3 apples # (features/apples.feature):11
Failed asserting that 2 matches expected 3.
------------
......U.......
--- FAIL ---
Then I should have 8 apples # (features/apples.feature):25
Failed asserting that 7 matches expected 8.
------------
.....UU
Installation
composer require --dev drevops/behat-format-progress-fail
Usage
vendor/bin/behat --format=progress_fail
Configure
behat.yml
default: extensions: DrevOps\BehatFormatProgressFail\FormatExtension: ~
or
behat.yml
default: extensions: DrevOps\BehatFormatProgressFail\FormatExtension: show_output: in-summary # Supported values: yes | no | on-fail
show_output
Show output from within test steps. "Output" is print, echo, var_dump, etc.
yes- always show the outputno- do not show the outputon-fail- only show the output if there are test failsin-summary- only show in the summary if there are test fails
Migrating to Behat core
Upgrade Behat, remove this extension from your behat.yml, and enable the option on the built-in progress formatter instead:
behat.yml
default: formatters: progress: inline_failures: true show_output: in-summary
Or pass it on the command line:
vendor/bin/behat --format=progress --format-settings='{"inline_failures": true}'
show_output keeps the same four values in core that it has here (yes, no, on-fail, in-summary), so that part of your configuration carries over unchanged.
Then drop the dependency:
composer remove --dev drevops/behat-format-progress-fail
One caveat on timing: inline_failures is merged into Behat's 3.x branch, but it has not been tagged in a stable release yet (the newest is v3.32.0). It will land in the next 3.x release. Until then, stay on this extension - that is what the support window through December 2026 is for.
Maintenance
Lint code
composer lint composer lint-fix
Run tests
composer test
This repository was created using the Scaffold project template
