feat: add bilibili ios script

This commit is contained in:
徐聪
2024-06-04 22:17:26 +08:00
parent 4599c47bcb
commit 99757954c6
11 changed files with 176 additions and 8 deletions
+8 -1
View File
@@ -4,6 +4,7 @@ import (
"crypto/tls"
_ "embed"
"fmt"
"github.com/httprunner/funplugin"
"net"
"net/http"
"net/http/cookiejar"
@@ -17,7 +18,6 @@ import (
"time"
"github.com/gorilla/websocket"
"github.com/httprunner/funplugin"
"github.com/jinzhu/copier"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
@@ -240,6 +240,13 @@ func (r *HRPRunner) Run(testcases ...ITestCase) (err error) {
}
}()
if caseRunner.parsedConfig.PluginSetting != nil {
if p, ok := pluginMap.Load(caseRunner.parsedConfig.PluginSetting.Path); ok {
log.Info().Msg(fmt.Sprintf("starting to keep live, path: %v, address: %v", caseRunner.parsedConfig.PluginSetting.Path, p))
go p.(funplugin.IPlugin).StartHeartbeat()
}
}
for it := caseRunner.parametersIterator; it.HasNext(); {
// case runner can run multiple times with different parameters
// each run has its own session runner