Releases: volt-test/laravel-performance-testing
v1.2.0
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:
PerformanceTestCaseBase 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
VoltTestCaseclasses (fromapp/VoltTests/) in PHPUnit tests, enabling seamless code reuse between Artisan commands and PHPUnit test suites VoltTestAssertionsTrait - 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)
- Success rate assertions (
- Quick Load Testing Helpers - Convenience methods
loadTestUrl()andloadTestApi()for simple performance testing scenarios
Intelligent Server Management
Managing test servers has never been easier with our new server management infrastructure:
ServerManagerClass - Automatically manages PHP development server lifecycle with smart port selection and health checksServerRegistryClass - 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
ServerManagerTestandServerRegistryTestfor 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.mdcovering:- 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.xmlconfiguration 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
@testannotations in favor oftest_*method naming convention
Bug Fixes
- Fixed
assertVTMinResponseTimeassertion logic to correctly validate minimum response time thresholds - Improved time format parsing in
parseTimeToMsto handle various time units (hours, minutes, seconds, milliseconds, microseconds, nanoseconds) - Removed deprecated
@testannotations from test files to comply with PHPUnit 11 best practices
Dependencies
- Added
ext-pcntlrequirement 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
- Full Changelog: v1.1.0...v1.2.0
- Installation:
composer require volt-test/laravel-performance-testing - Documentation: GitHub Repository
💡 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
v1.0.0
0.0.6-beta
Merge pull request #6 from volt-test/laravel-versions-with-stability install
0.0.5-beta
Merge pull request #5 from volt-test/laravel-versions-with-stability laravel versions with stability
0.0.4-beta
release: Release V0.0.4-beta
0.0.3-beta
New beta release
0.0.2-beta
second beta
0.0.1-beta
first beta release