feat: specify running cycles for load testing.

This commit is contained in:
徐聪
2022-01-12 14:51:53 +08:00
parent 7a15df3177
commit 1d04b2c22d
6 changed files with 12 additions and 11 deletions

View File

@@ -29,8 +29,8 @@ Copyright 2021 debugtalk
### SEE ALSO
* [hrp boom](hrp_boom.md) - run load test with boomer
* [hrp har2case](hrp_har2case.md) - Convert HAR to json/yaml testcase files
* [hrp har2case](hrp_har2case.md) - convert HAR to json/yaml testcase files
* [hrp run](hrp_run.md) - run API test
* [hrp startproject](hrp_startproject.md) - Create a scaffold project
* [hrp startproject](hrp_startproject.md) - create a scaffold project
###### Auto generated by spf13/cobra on 8-Jan-2022
###### Auto generated by spf13/cobra on 12-Jan-2022

View File

@@ -38,4 +38,4 @@ hrp boom [flags]
* [hrp](hrp.md) - One-stop solution for HTTP(S) testing.
###### Auto generated by spf13/cobra on 8-Jan-2022
###### Auto generated by spf13/cobra on 12-Jan-2022

View File

@@ -1,10 +1,10 @@
## hrp har2case
Convert HAR to json/yaml testcase files
convert HAR to json/yaml testcase files
### Synopsis
Convert HAR to json/yaml testcase files
convert HAR to json/yaml testcase files
```
hrp har2case $har_path... [flags]
@@ -23,4 +23,4 @@ hrp har2case $har_path... [flags]
* [hrp](hrp.md) - One-stop solution for HTTP(S) testing.
###### Auto generated by spf13/cobra on 8-Jan-2022
###### Auto generated by spf13/cobra on 12-Jan-2022

View File

@@ -31,4 +31,4 @@ hrp run $path... [flags]
* [hrp](hrp.md) - One-stop solution for HTTP(S) testing.
###### Auto generated by spf13/cobra on 8-Jan-2022
###### Auto generated by spf13/cobra on 12-Jan-2022

View File

@@ -1,6 +1,6 @@
## hrp startproject
Create a scaffold project
create a scaffold project
```
hrp startproject $project_name [flags]
@@ -16,4 +16,4 @@ hrp startproject $project_name [flags]
* [hrp](hrp.md) - One-stop solution for HTTP(S) testing.
###### Auto generated by spf13/cobra on 8-Jan-2022
###### Auto generated by spf13/cobra on 12-Jan-2022

View File

@@ -1,6 +1,7 @@
package boomer
import (
"sync/atomic"
"testing"
"time"
@@ -109,7 +110,7 @@ func TestLoopCount(t *testing.T) {
ticker := time.NewTicker(4 * time.Second)
defer ticker.Stop()
<-ticker.C
if !assert.Equal(t, runner.loop.loopCount, runner.loop.finishedCount) {
if !assert.Equal(t, runner.loop.loopCount, atomic.LoadInt64(&runner.loop.finishedCount)) {
t.Fail()
}
}