PHPackages                             pccomponentes/bdd-api-io-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. [API Development](/categories/api)
4. /
5. pccomponentes/bdd-api-io-context

Abandoned → [pccomponentes/open-api-messaging-context](/?search=pccomponentes%2Fopen-api-messaging-context)Library[API Development](/categories/api)

pccomponentes/bdd-api-io-context
================================

v0.0.4(7y ago)015PHP

Since Jul 23Pushed 7y ago2 watchersCompare

[ Source](https://github.com/PcComponentes/bdd-api-io-context)[ Packagist](https://packagist.org/packages/pccomponentes/bdd-api-io-context)[ RSS](/packages/pccomponentes-bdd-api-io-context/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (7)Versions (5)Used By (0)

Bdd API IO Context
==================

[](#bdd-api-io-context)

Helper context classes for easy ATDD in a Api Rest with Behat

Enable MinkExtension in your behat.yml
======================================

[](#enable-minkextension-in-your-behatyml)

```
default:
  extensions:
    Behat\MinkExtension:
      sessions:
        my_session:
          symfony2: ~
```

Add Request and Response contexts to your paths
===============================================

[](#add-request-and-response-contexts-to-your-paths)

```
  suites:
    yoursuitte:
      paths: [ tests/api/features/product ]
      contexts:
        - Pccomponentes\BddApiIOContext\Infrastructure\Behat\ApiContext\ApiRequestContext
        - Pccomponentes\BddApiIOContext\Infrastructure\Behat\ApiContext\ApiResponseContext
```

Now, you can use the contexts in your features
==============================================

[](#now-you-can-use-the-contexts-in-your-features)

Examples:

```
#POST
Scenario: Create a product
    When  I send a POST request to "/products" with body:
    """
    {
      "product_id": "73118479-28a6-401e-9dad-6c88eac17484",
      "name": "fake product"
    }
    """
    Then the response should be empty
    And the response status code should be 201
```

```
#GET
Scenario: Find an existing product
    When I send a GET request to "/products/73118479-28a6-401e-9dad-6c88eac17484"
    Then the response status code should be 200
    And the response content should be:
    """
    {
      "id": "73118479-28a6-401e-9dad-6c88eac17484",
      "name": "fake product"
    }
    """
```

Don`t forget your given clauses for prepare your scenarios!!!

Good practices
==============

[](#good-practices)

Is a good practice create another context that reset your environment and execute before any test

```
    /** @BeforeScenario */
    public function clearEnvironment()
    {
        //... clear your envirnomnet
    }
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Total

4

Last Release

2782d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c4eb3322c15a9344e9c086a7de11c3204bf5aab5321b562bf9193f5ee8cd420?d=identicon)[zoilomora](/maintainers/zoilomora)

---

Top Contributors

[![AaronBernabeu](https://avatars.githubusercontent.com/u/3294776?v=4)](https://github.com/AaronBernabeu "AaronBernabeu (11 commits)")

### Embed Badge

![Health badge](/badges/pccomponentes-bdd-api-io-context/health.svg)

```
[![Health](https://phpackages.com/badges/pccomponentes-bdd-api-io-context/health.svg)](https://phpackages.com/packages/pccomponentes-bdd-api-io-context)
```

###  Alternatives

[drupal/drupal-extension

Drupal extension for Behat

22215.1M146](/packages/drupal-drupal-extension)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2021.0M276](/packages/drupal-core-dev)[polishsymfonycommunity/symfony2-mocker-extension

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

26253.1k4](/packages/polishsymfonycommunity-symfony2-mocker-extension)[drevops/behat-steps

Collection of steps for Behat

25381.7k3](/packages/drevops-behat-steps)

PHPackages © 2026

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