ministryofjustice / behat-test-statistics
This package is abandoned and no longer maintained.
No replacement package was suggested.
A Behat context file to add test suite statistics
dev-main
2021-06-09 13:42 UTC
Requires
- php: >=7.4.3
- behat/behat: ^3.8.1
- nesbot/carbon: ^2.40
This package is not auto-updated.
Last update: 2022-12-21 12:30:33 UTC
README
Table of Contents
About The Project
A place to store commonly used Behat context files that provide useful statistics on test suites.
Built With
Getting Started
The contexts included here are designed to be dropped in to a project without any setup required.
Prerequisites
- behat
composer require --dev behat/behat
Installation
Add to your project using composer:
composer require --dev ministryofjustice/behat-test-statistics
Alternatively, manually download the source code to persist in your project.
Usage
There are two approaches to using the context file.
- Add to your behat.yml suite config as a context:
default: suites: ui-tests: description: A minimal UI test suite paths: [ "%paths.base%/features" ] filters: tags: "@ui" contexts: - App\Tests\Behat\FeatureContext - MinistryOfJustice\BehatContexts\TestStatisticsContext
- Extend your base context file using
MinistryOfJustice\BehatContexts\TestStatisticsContext
:
<?php declare(strict_types=1); namespace App\Tests\Behat\v2\Common; class BaseFeatureContext extends MinistryOfJustice\BehatContexts\TestStatisticsContext {}
Once the feature context is plugged into your test suites it will automatically flag any slow running suites or steps at the end of the test run:
Contributing
Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.