PHPackages                             openeuropa/behat-transformation-context - 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. openeuropa/behat-transformation-context

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

openeuropa/behat-transformation-context
=======================================

Behat package to transform human readable labels into selectors or page paths.

0.3.0(11mo ago)097.0k↓28.8%13EUPL-1.2PHPPHP &gt;=8.1CI passing

Since Jul 3Pushed 4mo ago14 watchersCompare

[ Source](https://github.com/openeuropa/behat-transformation-context)[ Packagist](https://packagist.org/packages/openeuropa/behat-transformation-context)[ Docs](https://github.com/openeuropa/behat-transformation-context)[ RSS](/packages/openeuropa-behat-transformation-context/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (9)Used By (13)

Behat Transformation Context
============================

[](#behat-transformation-context)

[![Build Status](https://camo.githubusercontent.com/d67a5ed561cd8366320e08edc6405ab84fea83c7870c898e26674c1ad07130b2/68747470733a2f2f64726f6e652e66706669732e65752f6170692f6261646765732f6f70656e6575726f70612f62656861742d7472616e73666f726d6174696f6e2d636f6e746578742f7374617475732e737667)](https://drone.fpfis.eu/openeuropa/behat-transformation-context/)[![Packagist](https://camo.githubusercontent.com/5e6f30d40b47746f11cee3cbd2dbc66ce5ecc6ddf59b85d55400b6f9ec17a3a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f70656e6575726f70612f62656861742d7472616e73666f726d6174696f6e2d636f6e746578742e737667)](https://packagist.org/packages/openeuropa/behat-transformation-context)

This package provides a Behat context allowing to transform human readable labels to selectors or page paths. Such functionality improves the readability of the Behat tests.

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

[](#installation)

```
$ composer require openeuropa/behat-transformation-context

```

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

[](#configuration)

Add the extension and context to your test suite in `behat.yml`:

```
default:
  suites:
    default:
      contexts:
        - OpenEuropa\Behat\TransformationContext:
            elements:
              header: 'div#header'
            pages:
              home: 'index.php'
```

Usage
-----

[](#usage)

We can use steps such as [these](https://github.com/openeuropa/behat-transformation-context/blob/master/tests/features/behat-test.feature):

```
    Given I point to *the home page*
    Then previous step targets "*index.php*"
    When I point to the "*header*" element
    Then previous step targets "*div#header*"
```

Development
-----------

[](#development)

Running tests locally:

```
$ git clone git@github.com:openeuropa/behat-transformation-context.git
$ cd behat-transformation-context
$ composer install
$ ./vendor/bin/behat

```

### Using Docker Compose

[](#using-docker-compose)

The setup procedure described above can be sensitively simplified by using Docker Compose.

Requirements:

- [Docker](https://www.docker.com/get-docker)
- [Docker-compose](https://docs.docker.com/compose/)

Run:

```
$ docker-compose up -d

```

Then:

```
$ docker-compose exec web composer install

```

[GrumPHP](https://github.com/phpro/grumphp/tree/master/doc) tasks will be ran at every commit, if you with to run them without performing a commit use the following command:

```
$ ./vendor/bin/grumphp run

```

If you want to simulate a commit message use:

```
$ ./vendor/bin/grumphp git:pre-commit

```

#### Step debugging

[](#step-debugging)

To enable step debugging from the command line, pass the `XDEBUG_SESSION` environment variable with any value to the container:

```
docker-compose exec -e XDEBUG_SESSION=1 web
```

Please note that, starting from XDebug 3, a connection error message will be outputted in the console if the variable is set but your client is not listening for debugging connections. The error message will cause false negatives for PHPUnit tests.

To initiate step debugging from the browser, set the correct cookie using a browser extension or a bookmarklet like the ones generated at .

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance65

Regular maintenance activity

Popularity30

Limited adoption so far

Community29

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~506 days

Recently: every ~611 days

Total

6

Last Release

342d ago

PHP version history (4 changes)0.1.0PHP &gt;=5.4

0.1.3PHP &gt;=7.4

0.2.0PHP &gt;=8.0

0.3.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/8562a7045bde4094cf1252195ae47001970518ed7281b9e13caa6b6ffea03a5b?d=identicon)[ademarco](/maintainers/ademarco)

![](https://www.gravatar.com/avatar/d3b1f4079f9a82f6dd88fe6577d1256b4ecbbccbcd4a4ec9bea7c2fd6f72b99a?d=identicon)[DIGIT-CORE](/maintainers/DIGIT-CORE)

---

Top Contributors

[![voidtek](https://avatars.githubusercontent.com/u/186827?v=4)](https://github.com/voidtek "voidtek (11 commits)")[![nagyad](https://avatars.githubusercontent.com/u/22004498?v=4)](https://github.com/nagyad "nagyad (10 commits)")[![mferran-europe](https://avatars.githubusercontent.com/u/94525116?v=4)](https://github.com/mferran-europe "mferran-europe (7 commits)")[![imanoleguskiza](https://avatars.githubusercontent.com/u/14978592?v=4)](https://github.com/imanoleguskiza "imanoleguskiza (5 commits)")[![sergepavle](https://avatars.githubusercontent.com/u/9432036?v=4)](https://github.com/sergepavle "sergepavle (5 commits)")[![hernani](https://avatars.githubusercontent.com/u/707860?v=4)](https://github.com/hernani "hernani (4 commits)")[![22Alexandra](https://avatars.githubusercontent.com/u/22908988?v=4)](https://github.com/22Alexandra "22Alexandra (4 commits)")[![ademarco](https://avatars.githubusercontent.com/u/153362?v=4)](https://github.com/ademarco "ademarco (3 commits)")[![brummbar](https://avatars.githubusercontent.com/u/8488617?v=4)](https://github.com/brummbar "brummbar (2 commits)")

---

Tags

testtransformBehat

### Embed Badge

![Health badge](/badges/openeuropa-behat-transformation-context/health.svg)

```
[![Health](https://phpackages.com/badges/openeuropa-behat-transformation-context/health.svg)](https://phpackages.com/packages/openeuropa-behat-transformation-context)
```

###  Alternatives

[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

593.6M37](/packages/dvdoug-behat-code-coverage)[robertfausk/behat-panther-extension

Symfony Panther extension for Behat

341.7M87](/packages/robertfausk-behat-panther-extension)[leanphp/behat-code-coverage

Generate Code Coverage reports for Behat tests

50359.8k2](/packages/leanphp-behat-code-coverage)[devinci/devinci-behat-extension

Provides extra behat goodies.

17593.9k](/packages/devinci-devinci-behat-extension)[polishsymfonycommunity/symfony2-mocker-extension

Behat extension for mocking services defined in the Symfony2 dependency injection container.

26253.1k4](/packages/polishsymfonycommunity-symfony2-mocker-extension)[kielabokkie/jsonapi-behat-extension

Behat extension for testing JSON APIs

1516.5k](/packages/kielabokkie-jsonapi-behat-extension)

PHPackages © 2026

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