Skip to content

Commit

Permalink
expand tests for k6 package (#26061)
Browse files Browse the repository at this point in the history
this commit extends the test for k6 package and load tests a demo
environment in runtime.

follow up from #25769

<details><summary>Details</summary>
<p>

```bash
[sdk] ❯ make test/k6
# truncated output
2024/08/10 10:27:04 WARN + k6 run script.js '--duration=1.5s'
2024/08/10 10:27:04 INFO
2024/08/10 10:27:04 INFO           /\      |‾‾| /‾‾/   /‾‾/
2024/08/10 10:27:04 INFO      /\  /  \     |  |/  /   /  /
2024/08/10 10:27:04 INFO     /  \/    \    |     (   /   ‾‾\
2024/08/10 10:27:04 INFO    /          \   |  |\  \ |  (‾)  |
2024/08/10 10:27:04 INFO   / __________ \  |__| \__\ \_____/ .io
2024/08/10 10:27:04 INFO
2024/08/10 10:27:05 INFO      execution: local
2024/08/10 10:27:05 INFO         script: script.js
2024/08/10 10:27:05 INFO         output: -
2024/08/10 10:27:05 INFO
2024/08/10 10:27:05 INFO      scenarios: (100.00%) 1 scenario, 10 max VUs, 31.5s max duration (incl. graceful stop):
2024/08/10 10:27:05 INFO               * default: 10 looping VUs for 1.5s (gracefulStop: 30s)
2024/08/10 10:27:05 INFO
2024/08/10 10:27:06 INFO
2024/08/10 10:27:06 INFO running (01.0s), 10/10 VUs, 0 complete and 0 interrupted iterations
2024/08/10 10:27:06 INFO default   [  67% ] 10 VUs  1.0s/1.5s
2024/08/10 10:27:07 INFO
2024/08/10 10:27:07 INFO running (02.0s), 10/10 VUs, 0 complete and 0 interrupted iterations
2024/08/10 10:27:07 INFO default ↓ [ 100% ] 10 VUs  1.5s
2024/08/10 10:27:07 INFO
2024/08/10 10:27:07 INFO      data_received..................: 170 kB 64 kB/s
2024/08/10 10:27:07 INFO      data_sent......................: 4.4 kB 1.7 kB/s
2024/08/10 10:27:07 INFO      http_req_blocked...............: avg=1.33s    min=1.31s    med=1.33s    max=1.33s    p(90)=1.33s    p(95)=1.33s
2024/08/10 10:27:07 INFO      http_req_connecting............: avg=273.82ms min=273.58ms med=273.76ms max=274.32ms p(90)=274.04ms p(95)=274.18ms
2024/08/10 10:27:07 INFO      http_req_duration..............: avg=298.19ms min=288.96ms med=299.01ms max=300.99ms p(90)=299.44ms p(95)=300.22ms
2024/08/10 10:27:07 INFO        { expected_response:true }...: avg=298.19ms min=288.96ms med=299.01ms max=300.99ms p(90)=299.44ms p(95)=300.22ms
2024/08/10 10:27:07 INFO      http_req_failed................: 0.00%  ✓ 0        ✗ 10
2024/08/10 10:27:07 INFO      http_req_receiving.............: avg=103.34µs min=43.96µs  med=104.31µs max=161.31µs p(90)=145.71µs p(95)=153.51µs
2024/08/10 10:27:07 INFO      http_req_sending...............: avg=57.56µs  min=40.31µs  med=57.62µs  max=75.81µs  p(90)=69.08µs  p(95)=72.45µs
2024/08/10 10:27:07 INFO      http_req_tls_handshaking.......: avg=272.57ms min=254.69ms med=274.79ms max=274.88ms p(90)=274.88ms p(95)=274.88ms
2024/08/10 10:27:07 INFO      http_req_waiting...............: avg=298.03ms min=288.74ms med=298.85ms max=300.86ms p(90)=299.34ms p(95)=300.1ms
2024/08/10 10:27:07 INFO      http_reqs......................: 10     3.788702/s
2024/08/10 10:27:07 INFO      iteration_duration.............: avg=2.63s    min=2.6s     med=2.63s    max=2.63s    p(90)=2.63s    p(95)=2.63s
2024/08/10 10:27:07 INFO      iterations.....................: 10     3.788702/s
2024/08/10 10:27:07 INFO      vus............................: 10     min=10     max=10
2024/08/10 10:27:07 INFO      vus_max........................: 10     min=10     max=10
2024/08/10 10:27:07 INFO
2024/08/10 10:27:07 INFO
2024/08/10 10:27:07 INFO running (02.6s), 00/10 VUs, 10 complete and 0 interrupted iterations
2024/08/10 10:27:07 INFO default ✓ [ 100% ] 10 VUs  1.5s
2024/08/10 10:27:10 WARN + exit 0
```

</p>
</details> 

// cc @mamccorm _(no rush from my end)_

Signed-off-by: kranurag7 <[email protected]>
  • Loading branch information
kranurag7 authored Aug 11, 2024
1 parent 75597c4 commit 768a6a5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion k6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,10 @@ update:

test:
pipeline:
- runs: |
- name: "test out k6 version"
runs: |
k6 version
- name: "run a demo test"
runs: |
k6 new
k6 run script.js --duration=1.5s

0 comments on commit 768a6a5

Please sign in to comment.