diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2366ed..36d8b21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, macos-latest] php: [8.0 ,8.1 ,8.2, 8.3, 8.4] steps: - uses: actions/checkout@v4 diff --git a/src/Platform.php b/src/Platform.php index a2bb622..9776569 100644 --- a/src/Platform.php +++ b/src/Platform.php @@ -6,7 +6,7 @@ class Platform { private const BINARY_NAME = 'volt-test'; - private const ENGINE_CURRENT_VERSION = 'v0.0.1'; + private const ENGINE_CURRENT_VERSION = 'v0.1.0'; private const BASE_DOWNLOAD_URL = 'https://github.com/volt-test/binaries/releases/download'; private const SUPPORTED_PLATFORMS = [ 'linux-amd64' => 'volt-test-linux-amd64', diff --git a/tests/VoltTestTest.php b/tests/VoltTestTest.php new file mode 100644 index 0000000..c660b84 --- /dev/null +++ b/tests/VoltTestTest.php @@ -0,0 +1,52 @@ +setVirtualUsers(1); + + // Create first scenario + $scenario1 = $voltTest->scenario("Test Scenario")->setWeight(100); + $scenario1->step("Step 1") + ->get('https://www.google.com') + ->setThinkTime('1s') + ->validateStatus('success', 200); + + $scenario1->step("Step 2") + ->get('https://www.google.com') + ->setThinkTime('1s') + ->validateStatus('success', 200); + + $result = $voltTest->run(true); + + // Verify response time metrics + $avgResponseTime = $result->getAvgResponseTime(); + var_dump($avgResponseTime); + if ($avgResponseTime !== null) { + $this->assertStringContainsString('ms', $avgResponseTime, "Average response time should contain 'ms'"); + } + + } +}