Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mikelgoig/codeception-openapi

✔︎ Codeception module for contract testing with OpenAPI.
https://github.com/mikelgoig/codeception-openapi

codeception contract-testing dev gherkin openapi rest symfony testing

Last synced: 4 days ago
JSON representation

✔︎ Codeception module for contract testing with OpenAPI.

Awesome Lists containing this project

README

        


Codeception Module for contract testing with OpenAPI


Created by Mikel Goig.



View Repository

---

![Packagist Version](https://img.shields.io/packagist/v/mikelgoig/codeception-openapi)
![Packagist Downloads](https://img.shields.io/packagist/dt/mikelgoig/codeception-openapi)
![Packagist PHP Version](https://img.shields.io/packagist/dependency-v/mikelgoig/codeception-openapi/php)

**This Codeception module provides you with actions to validate API requests and responses with
an [OpenAPI](https://openapis.org) Specification.**

It requires [REST](https://codeception.com/docs/modules/REST)
and [Symfony](https://codeception.com/docs/modules/Symfony) modules.

It supports [Gherkin format](https://codeception.com/docs/BDD).

## 😎 Installation

1. Install this package using Composer:

```bash
composer require --dev mikelgoig/codeception-openapi
```

## 🛠️ Configuration

1. Add the Codeception module to your config file:

```yml
modules:
enabled:
- MikelGoig\Codeception\Module\OpenApi:
depends: [ REST, Symfony ]
openapi: path/to/openapi.yaml
multipart_boundary: foo
```

* `openapi` - the path of the OpenAPI file
* `multipart_boundary` *optional* - the boundary parameter for multipart requests

2. To set up Gherkin steps, enable the `gherkin` part of the module:

```yml
modules:
enabled:
- MikelGoig\Codeception\Module\OpenApi:
# ...
part: gherkin
```