webimp/codeception-performance-test

Codeception Extension to measure the performance of your tests

1.0.4 2017-01-08 07:25 UTC

This package is not auto-updated.

Last update: 2025-04-26 23:47:13 UTC


README

Codacy Badge

Codeception Extension to list out slow steps during the test. Compatible with Codeception 2.2.7.

After running your tests you will see a Performance Report of your slow tests:

Slow Steps (more than 2.5s) ----------------------
I click button 6s

Installation

Add PerformanceTest to your composer.json:

  "require-dev": {
    ...
    "webimp/codeception-performance-test": "1.0.*",

Usage

Add this to your extensions line at the bottom of your codeception.yml:

actor: Tester
paths:
    tests: tests
    log: tests/_output
    data: tests/_data
    helpers: tests/_support
settings:
    bootstrap: _bootstrap.php
    colors: true
    memory_limit: 1024M
extensions:
    enabled:
        - Codeception\Extension\PerformanceTest:
            benchmark: 2.5 # min seconds for step to be marked as "slow"

Include the file into your _bootstrap.php:

include('./vendor/webimp/codeception-performance-test/src/PerformanceTest.php');