mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-09 09:27:26 +08:00
refactor: add WDA/UIA logs to summary
This commit is contained in:
@@ -711,27 +711,27 @@ func (r *SessionRunner) Start(givenVars map[string]interface{}) (summary *TestCa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: move to mobile ui step
|
|
||||||
// Collect logs from cached drivers
|
// Collect logs from cached drivers
|
||||||
for _, cached := range uixt.ListCachedDrivers() {
|
for _, cached := range uixt.ListCachedDrivers() {
|
||||||
// add WDA/UIA logs to summary
|
client := cached.Item
|
||||||
|
if !client.GetDevice().LogEnabled() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// add WDA/UIA2 logs to summary
|
||||||
logs := map[string]interface{}{
|
logs := map[string]interface{}{
|
||||||
"uuid": cached.Key,
|
"uuid": cached.Key,
|
||||||
}
|
}
|
||||||
|
log, err1 := client.StopCaptureLog()
|
||||||
client := cached.Item
|
if err1 != nil {
|
||||||
if client.GetDevice().LogEnabled() {
|
if err == nil {
|
||||||
log, err1 := client.StopCaptureLog()
|
err = errors.Wrap(err1, "stop capture log failed")
|
||||||
if err1 != nil {
|
} else {
|
||||||
if err == nil {
|
err = errors.Wrap(err, "stop capture log failed")
|
||||||
err = errors.Wrap(err1, "stop capture log failed")
|
|
||||||
} else {
|
|
||||||
err = errors.Wrap(err, "stop capture log failed")
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
logs["content"] = log
|
return
|
||||||
}
|
}
|
||||||
|
logs["content"] = log
|
||||||
|
|
||||||
summary.Logs = append(summary.Logs, logs)
|
summary.Logs = append(summary.Logs, logs)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user