PHPackages                             xentral/laravel-testing - 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. xentral/laravel-testing

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

xentral/laravel-testing
=======================

A laravel package which provides workflows and tooling around testing

0.6.0(1mo ago)031.9k—9.9%1MITPHPPHP ^8.2 || ^8.3CI passing

Since Aug 17Pushed 2mo agoCompare

[ Source](https://github.com/xentral/laravel-testing)[ Packagist](https://packagist.org/packages/xentral/laravel-testing)[ Docs](https://github.com/xentral/laravel-testing)[ RSS](/packages/xentral-laravel-testing/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (39)Versions (13)Used By (1)

Laravel Testing
===============

[](#laravel-testing)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f951ddaa821a13f3ee4e3e87617c12d0efd76d1532533437ac0f7243212bbd57/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f78656e7472616c2f6c61726176656c2d74657374696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xentral/laravel-testing)[![Total Downloads](https://camo.githubusercontent.com/f293fd417185bb8b65014c7cf142a7a4ab0a7692599b2c85c26fec67f56aeff8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f78656e7472616c2f6c61726176656c2d74657374696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/xentral/laravel-testing)[![GitHub Actions](https://github.com/xentral/laravel-testing/actions/workflows/main.yml/badge.svg)](https://github.com/xentral/laravel-testing/actions/workflows/main.yml/badge.svg)

This package provides comprehensive testing tools for Laravel applications, including OpenAPI validation, Behat feature testing, and Qase test reporting integration.

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

[](#installation)

You can install the package via composer.

```
composer --dev require xentral/laravel-testing
```

Usage
-----

[](#usage)

### OpenAPI Validation

[](#openapi-validation)

Automatically validate your API responses against OpenAPI schemas in your tests.

The Schema file will be determined in the following order:

- Using the `schemaFilePath` property (if not `null`)
- Using the `SchemaFile` attribute
- Using the configured `testing.openapi.default_schema` config value

Relative paths will be auto prefixed with the project base path (by default)

**Basic example with PHPUnit:**

```
