Skip to content

Releases: volt-test/laravel-performance-testing

v1.2.0

22 Nov 13:36

Choose a tag to compare

VoltTest Laravel Performance Testing v1.2.0

Thrilled to share the release of VoltTest v1.2.0 — a major update introducing seamless PHPUnit integration to supercharge your Laravel performance testing workflow!

What's New

PHPUnit Integration

This release introduces comprehensive PHPUnit integration, allowing you to run VoltTest performance tests directly within your PHPUnit test suites. This means you can now combine functional tests with performance testing in a unified testing workflow.

Key Features:

  • PerformanceTestCase Base Class - A new abstract base class that makes it easy to create PHPUnit performance tests with built-in server management and VoltTest integration
  • Reusable VoltTest Classes - Run your existing VoltTestCase classes (from app/VoltTests/) in PHPUnit tests, enabling seamless code reuse between Artisan commands and PHPUnit test suites
  • VoltTestAssertions Trait - A comprehensive set of assertion methods for validating performance test results:
    • Success rate assertions (assertVTSuccessful, assertVTErrorRate)
    • Response time assertions (min, max, average, median, P95, P99)
    • Throughput assertions (minimum requests, RPS limits)
  • Quick Load Testing Helpers - Convenience methods loadTestUrl() and loadTestApi() for simple performance testing scenarios

Intelligent Server Management

Managing test servers has never been easier with our new server management infrastructure:

  • ServerManager Class - Automatically manages PHP development server lifecycle with smart port selection and health checks
  • ServerRegistry Class - Global registry for managing multiple server instances across test suites with automatic cleanup
  • Automatic Server Lifecycle - Servers start and stop automatically before and after test classes
  • Port Conflict Resolution - Automatic detection and handling of port conflicts with intelligent fallback port selection

Enhanced Testing Infrastructure

  • Comprehensive Test Coverage - Added ServerManagerTest and ServerRegistryTest for robust server management testing
  • Performance Test Examples - Real-world example tests demonstrating PHPUnit integration patterns

Documentation & Developer Experience

  • PHPUnit Integration Guide - Comprehensive documentation at docs/PHPUNIT_INTEGRATION.md covering:
    • Complete setup instructions and requirements
    • All available assertions with examples
    • Server management configuration
    • Best practices and troubleshooting
    • Real-world usage examples
  • CHANGELOG.md - Added changelog file to track version history and changes

Improvements

  • Enhanced CI/CD - Updated GitHub Actions workflow to trigger on all branches for comprehensive testing
  • PHPUnit 11 Compatibility - Refactored phpunit.xml configuration for PHPUnit 11.0 compatibility with improved test reporting
  • Type Safety - Added strict types declarations for improved type safety and error detection
  • Modern Test Conventions - Removed deprecated @test annotations in favor of test_* method naming convention

Bug Fixes

  • Fixed assertVTMinResponseTime assertion logic to correctly validate minimum response time thresholds
  • Improved time format parsing in parseTimeToMs to handle various time units (hours, minutes, seconds, milliseconds, microseconds, nanoseconds)
  • Removed deprecated @test annotations from test files to comply with PHPUnit 11 best practices

Dependencies

  • Added ext-pcntl requirement for process control functionality needed by server management

Quick Start Example

use VoltTest\Testing\PerformanceTestCase;

class HomePagePerformanceTest extends PerformanceTestCase
{
    public function test_homepage_handles_load()
    {
        $result = $this->loadTestUrl('/', [
            'duration' => '10s',
            'users' => 50,
        ]);

        $this->assertVTSuccessful($result);
        $this->assertVTMaxResponseTime($result, '200ms');
        $this->assertVTMinRPS($result, 100);
    }
}

Documentation

For detailed information on using the new PHPUnit integration, check out our comprehensive guide:

Links

💡 Upgrade Notes

This release is backward compatible with v1.1.0.


Built with ❤️ by @elwafa. Excited to see how you use PHPUnit integration to enhance your Laravel application's performance testing! 🎉

v1.1.0

11 Jul 18:44
a521662

Choose a tag to compare

What's Changed

Full Changelog: v1.0.0...v1.1.0

v1.0.0

26 Jun 18:43
0a2d90b

Choose a tag to compare

Intial Release

0.0.6-beta

26 Jun 18:29
0ac435b

Choose a tag to compare

Merge pull request #6 from volt-test/laravel-versions-with-stability

install

0.0.5-beta

26 Jun 18:20
a847bc2

Choose a tag to compare

Merge pull request #5 from volt-test/laravel-versions-with-stability

laravel versions with stability

0.0.4-beta

26 Jun 18:09

Choose a tag to compare

release: Release V0.0.4-beta

0.0.3-beta

23 Jun 21:40

Choose a tag to compare

New beta release

0.0.2-beta

23 Jun 20:27

Choose a tag to compare

second beta

0.0.1-beta

23 Jun 18:46

Choose a tag to compare

first beta release