mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-08 08:57:40 +08:00
refactor: add WDA/UIA logs to summary
This commit is contained in:
@@ -711,16 +711,17 @@ 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,
|
||||||
}
|
}
|
||||||
|
|
||||||
client := cached.Item
|
|
||||||
if client.GetDevice().LogEnabled() {
|
|
||||||
log, err1 := client.StopCaptureLog()
|
log, err1 := client.StopCaptureLog()
|
||||||
if err1 != nil {
|
if err1 != nil {
|
||||||
if err == nil {
|
if err == nil {
|
||||||
@@ -731,7 +732,6 @@ func (r *SessionRunner) Start(givenVars map[string]interface{}) (summary *TestCa
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
logs["content"] = log
|
logs["content"] = log
|
||||||
}
|
|
||||||
|
|
||||||
summary.Logs = append(summary.Logs, logs)
|
summary.Logs = append(summary.Logs, logs)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user