mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-13 08:59:44 +08:00
refactor: ios perfd
This commit is contained in:
@@ -98,7 +98,7 @@ type WorldCupLive struct {
|
||||
Interval int `json:"interval"` // seconds
|
||||
Duration int `json:"duration"` // seconds
|
||||
Timelines []timeLog `json:"timelines"`
|
||||
PerfData []string `json:"perfData"`
|
||||
PerfFile string `json:"perf"`
|
||||
}
|
||||
|
||||
func NewWorldCupLive(device uixt.Device, matchName, bundleID string, duration, interval int) *WorldCupLive {
|
||||
@@ -268,7 +268,7 @@ func (wc *WorldCupLive) dumpResult() error {
|
||||
encoder.SetEscapeHTML(false)
|
||||
encoder.SetIndent("", " ")
|
||||
|
||||
wc.PerfData = wc.driver.GetPerfData()
|
||||
wc.PerfFile = wc.driver.Device.StopPerf()
|
||||
err := encoder.Encode(wc)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("encode json failed")
|
||||
|
||||
@@ -60,10 +60,10 @@ func TestIOSDouyinWorldCupLive(t *testing.T) {
|
||||
uixt.WithWDAPort(8700),
|
||||
uixt.WithWDAMjpegPort(8800),
|
||||
uixt.WithXCTest("com.gtf.wda.runner.xctrunner"),
|
||||
// uixt.WithIOSPerfOptions(
|
||||
// uixt.WithIOSPerfNetwork(true),
|
||||
// uixt.WithIOSPerfBundleID("com.ss.iphone.ugc.Aweme"),
|
||||
// ),
|
||||
uixt.WithIOSPerfOptions(
|
||||
uixt.WithIOSPerfNetwork(true),
|
||||
// uixt.WithIOSPerfBundleID("com.ss.iphone.ugc.Aweme"),
|
||||
),
|
||||
uixt.WithIOSPcapOn(true),
|
||||
),
|
||||
TestSteps: []hrp.IStep{
|
||||
|
||||
Reference in New Issue
Block a user