PHPackages                             napp/codeception-sqlquery - 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. napp/codeception-sqlquery

ActiveLibrary

napp/codeception-sqlquery
=========================

SQL query assertions for Codeception

1.0(8y ago)012MITPHPPHP &gt;=7.0

Since Apr 24Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Napp/codeception-sqlquery-module)[ Packagist](https://packagist.org/packages/napp/codeception-sqlquery)[ RSS](/packages/napp-codeception-sqlquery/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Napp SQL Query Codeception module
=================================

[](#napp-sql-query-codeception-module)

Find N+1 or similar design bugs in your Laravel application.

Install with Composer
---------------------

[](#install-with-composer)

```
    {
        "require-dev": {
            "napp/codeception-sqlquery": "1.*"
        }
    }
```

Example suite configuration
---------------------------

[](#example-suite-configuration)

```
    modules:
        enabled:
            - Laravel5
            - Db:
                dsn: "mysql:host=localhost;dbname=testdb"
            - Database:
                depends: [Db, Laravel5]
                connection: my_database
```

Usage
-----

[](#usage)

```
public function _before()
{
    // start by enabling the listener
    $this->tester->enableSqlQueryListener();
}

public function test_my_api_endpoint()
{
    $this->tester->sendGET('api/my_endpoint');
    $this->tester->seeResponseCodeIs(200);
    $this->tester->seeResponseIsJson();

    // then test sql query count
    $this->tester->assertSqlQueriesLessThanOrEqual(2);
    $this->tester->assertSqlExecutionTimeLessThan(4);

    // dump the sql queries for debugging
    //$this->tester->debugSqlQueries();
}

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

2946d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e24155f0d3ab61799ca35477a940edce613075a20d1073f2241905271f29d23?d=identicon)[viezel](/maintainers/viezel)

---

Tags

codeceptioncodeception-modulelaravelsql-querytesting-toolslaravelcodeceptionnapp

### Embed Badge

![Health badge](/badges/napp-codeception-sqlquery/health.svg)

```
[![Health](https://phpackages.com/badges/napp-codeception-sqlquery/health.svg)](https://phpackages.com/packages/napp-codeception-sqlquery)
```

###  Alternatives

[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

394388.0k5](/packages/rtconner-laravel-likeable)[hemp/presenter

Easy Model Presenters in Laravel

247592.6k1](/packages/hemp-presenter)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)[janhenkgerritsen/codeception-laravel5

Laravel5 module for Codeception

5624.5k1](/packages/janhenkgerritsen-codeception-laravel5)

PHPackages © 2026

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