PHPackages                             bex/behat-choose-tests - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. bex/behat-choose-tests

ActiveLibrary[Testing &amp; Quality](/categories/testing)

bex/behat-choose-tests
======================

Extension for behat to allow you to interactively choose tests to run

1.0.1(6y ago)016MITPHPPHP &gt;=5.4

Since May 28Pushed 6y agoCompare

[ Source](https://github.com/tkotosz/behat-choose-tests)[ Packagist](https://packagist.org/packages/bex/behat-choose-tests)[ Docs](https://github.com/tkotosz/behat-choose-tests)[ RSS](/packages/bex-behat-choose-tests/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Behat-ChooseTestsExtension
==========================

[](#behat-choosetestsextension)

[![License](https://camo.githubusercontent.com/a69ad2c336aae31c61e092165288cbe0181ecc6859d75772b9abe4ff1e23fc6d/68747470733a2f2f706f7365722e707567782e6f72672f6265782f62656861742d63686f6f73652d74657374732f6c6963656e7365)](https://packagist.org/packages/bex/behat-choose-tests)[![Latest Stable Version](https://camo.githubusercontent.com/0deab080357809fdd64283288e0bf98f47271f9e0af1abfa2f1b4a47689ab25d/68747470733a2f2f706f7365722e707567782e6f72672f6265782f62656861742d63686f6f73652d74657374732f76657273696f6e)](https://packagist.org/packages/bex/behat-choose-tests)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3c24f5a2c59aed5e3b7cb8554f1c0e15a74f562101d39390001b447306957ee7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746b6f746f737a2f62656861742d63686f6f73652d74657374732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tkotosz/behat-choose-tests/?branch=master)[![Build Status](https://camo.githubusercontent.com/0243845b8c7e3daa9adadb1f12cf48328fedc01abd527c7d3ef7a58cfaaaba0b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746b6f746f737a2f62656861742d63686f6f73652d74657374732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tkotosz/behat-choose-tests/build-status/master)[![Build Status](https://camo.githubusercontent.com/26a98436be834dc80327f55897efa59768a718cb2c016debb3c24f097070c9ac/68747470733a2f2f7472617669732d63692e6f72672f746b6f746f737a2f62656861742d63686f6f73652d74657374732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tkotosz/behat-choose-tests)

Behat-ChooseTestsExtension allows you to interactively choose tests to run.

Installation
------------

[](#installation)

Install by adding to your `composer.json`:

```
composer require --dev bex/behat-choose-tests
```

Configuration
-------------

[](#configuration)

Enable the extension in `behat.yml` like this:

```
default:
  extensions:
    Bex\Behat\ChooseTestsExtension: ~
```

Usage
-----

[](#usage)

### Choose Suite

[](#choose-suite)

Run behat with `--choose-suite` option to interactively choose a suite to run:

1. it will not show the suite-chooser

    - if you are running behat with `--no-interaction` option
    - if you already specified the suite with the `--suite` option
    - if you have only 1 suite
2. it will allow you to choose `All` suite or a specific suite. Multiple choice is not allowed yet.

Example output:

```
foo@bar:~$ bin/behat --choose-suite

 Choose suite:

  [0] All
  [1] First Suite
  [2] Second Suite
 >
```

### Choose Feature

[](#choose-feature)

Run behat with `--choose-feature` option to interactively choose a feature to run:

1. it will not show the feature-chooser

    - if you are running behat with `--no-interaction` option
    - if you already specified the feature with passing the `` argument (e.g. `bin/behat features/my_awesome.feature`)
    - if you have only 1 feature
2. it will allow you to choose `All` feature or a specific feature. Multiple choice is not allowed yet.
3. it list all features or the features in the given suite if you already selected a suite with `--suite` or `--choose-suite`.

Example output:

```
foo@bar:~$ bin/behat --choose-feature

 Choose feature:

  [0] All
  [1] First feature (features/first.feature)
  [2] Second feature (features/second.feature)
  [3] Third feature (features/third.feature)
  [4] Forth feature (features/forth.feature)
 >
```

```
foo@bar:~$ bin/behat --suite="firstsuite" --choose-feature

 Choose feature:

  [0] All
  [1] First feature (features/first.feature)
  [2] Second feature (features/second.feature)
 >
```

### Choose Scenario

[](#choose-scenario)

Run behat with `--choose-scenario` option to interactively choose a scenario to run:

1. it will not show the scenario-chooser

    - if you are running behat with `--no-interaction` option
    - if you already specified the scenario with passing the `` argument and specifying a line number (e.g. `bin/behat features/my_awesome.feature:3`)
    - if you have only 1 scenario
2. it will allow you to choose `All` scenario or a specific scenario. Multiple choice is not allowed yet.
3. it list all scenarios or the scenarios in the given suite and feature if you already specified those. (Note that you can specify the suite with `--suite` or `--chose-suite` and you can specify the feature by passing the `` argument or using the `--choose-feature` option)

Example output:

```
foo@bar:~$ bin/behat --suite="firstsuite" --choose-scenario

 Choose scenario:

  [0] All
  [1] First scenario (features/first.feature:3)
  [2] Second scenario (features/first.feature:8)
  [3] Third scenario (features/first.feature:13)
  [4] First scenario (features/second.feature:3)
  [5] Second scenario (features/second.feature:8)
  [6] Third scenario (features/second.feature:13)
 >
```

```
foo@bar:~$ bin/behat features/first.feature --choose-scenario

 Choose scenario:

  [0] All
  [1] First scenario (features/first.feature:3)
  [2] Second scenario (features/first.feature:8)
  [3] Third scenario (features/first.feature:13)
 >
```

### Choose Tests

[](#choose-tests)

Run behat with `--choose-tests` option to interactively choose tests to run. It will simply enable all above choosers so `--choose-tests` is equivalent to `--choose-suite --choose--feature --choose-scenario`.

Example output:

```
foo@bar:~$ bin/behat --choose-tests

 Choose suite:

  [0] All
  [1] firstsuite
  [2] secondsuite
 > 1

 Choose feature:

  [0] All
  [1] First feature (features/first.feature)
  [2] Second feature (features/second.feature)
 > 1

 Choose scenario:

  [0] All
  [1] First scenario (features/first.feature:3)
  [2] Second scenario (features/first.feature:8)
  [3] Third scenario (features/first.feature:13)
 > 1

Feature: First feature

  Scenario: First scenario      # features/first.feature:3
    Given I have a few things   # FeatureContext::iHaveAFewThings()
    When I do whatever          # FeatureContext::iDoWhatever()
    Then I should see something # FeatureContext::iShouldSeeSomething()

1 scenario (1 passed)
3 steps (3 passed)
0m0.03s (7.85Mb)
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~680 days

Total

2

Last Release

2224d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6451ac5fdc814bfa3aec1b3cf746fdb3ccec68ccbbe3a6f30b3b6c9266b0cb79?d=identicon)[tkotosz](/maintainers/tkotosz)

---

Tags

BDDTDDBehat

### Embed Badge

![Health badge](/badges/bex-behat-choose-tests/health.svg)

```
[![Health](https://phpackages.com/badges/bex-behat-choose-tests/health.svg)](https://phpackages.com/packages/bex-behat-choose-tests)
```

###  Alternatives

[polishsymfonycommunity/symfony-mocker-container

Provides base Symfony dependency injection container enabling service mocking.

1468.0M237](/packages/polishsymfonycommunity-symfony-mocker-container)[bex/behat-extension-driver-locator

Driver locator tool for behat extensions

385.2M4](/packages/bex-behat-extension-driver-locator)[ciaranmcnulty/behat-stepthroughextension

Extension for behat to help debug failing scenarios

601.6M5](/packages/ciaranmcnulty-behat-stepthroughextension)[sensiolabs/behat-page-object-extension

Page object extension for Behat

1166.5M27](/packages/sensiolabs-behat-page-object-extension)[bex/behat-step-time-logger

Extension for behat to help find slow scenario steps by logging the step times

261.5M1](/packages/bex-behat-step-time-logger)[ezsystems/behat-screenshot-image-driver-cloudinary

Cloudinary image driver for bex/behat-screenshot behat extension

28992.5k16](/packages/ezsystems-behat-screenshot-image-driver-cloudinary)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
