Skip to content

Commit bfc5782

Browse files
committed
confirm that the volt test engine working
1 parent 4faa736 commit bfc5782

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

tests/VoltTestTest.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,19 @@ public function testVoltTest()
2828
$voltTest->setVirtualUsers(10);
2929

3030
// Create first scenario
31-
$scenario1 = $voltTest->scenario("Test Scenario")->setWeight(10);
31+
$scenario1 = $voltTest->scenario("Test Scenario")->setWeight(100);
3232
$scenario1->step("Step 1")
3333
->get('https://www.google.com')
34+
->setThinkTime('1s')
3435
->validateStatus('success', 200);
3536

36-
// Create second scenario
37-
$scenario2 = $voltTest->scenario("Test Scenario 2")->setWeight(90);
38-
$scenario2->step("Step 1")
37+
$scenario1->step("Step 2")
3938
->get('https://www.google.com')
39+
->setThinkTime('1s')
4040
->validateStatus('success', 200);
4141

42-
// Run test and get results
4342
$result = $voltTest->run(true);
4443

45-
// Basic assertions about test execution
46-
$this->assertNotEmpty($result->getRawOutput(), "Raw output should not be empty");
47-
48-
// Get duration and remove any 's' suffix if present
49-
$duration = str_replace('s', '', $result->getDuration());
50-
$this->assertNotEquals(0, (float)$duration, "Duration should not be 0");
51-
5244
// Verify response time metrics
5345
$avgResponseTime = $result->getAvgResponseTime();
5446
if ($avgResponseTime !== null) {

0 commit comments

Comments
 (0)