From 93dc17b8deb35ea15db25412522a986c586d7843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=B8=85?= Date: Mon, 29 Apr 2024 08:06:38 +0000 Subject: [PATCH] chore: identifier * chore: identifier * chore: identifier https://code.byted.org/iesqa/httprunner/merge_requests/35 --- hrp/internal/version/VERSION | 2 +- hrp/pkg/uixt/service_vedem.go | 1 + hrp/step.go | 1 + hrp/step_mobile_ui.go | 14 ++++++++++++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/hrp/internal/version/VERSION b/hrp/internal/version/VERSION index 3a6c610b..d1e4171f 100644 --- a/hrp/internal/version/VERSION +++ b/hrp/internal/version/VERSION @@ -1 +1 @@ -v4.3.9 +v4.3.10 diff --git a/hrp/pkg/uixt/service_vedem.go b/hrp/pkg/uixt/service_vedem.go index 86d66dd1..186296c3 100644 --- a/hrp/pkg/uixt/service_vedem.go +++ b/hrp/pkg/uixt/service_vedem.go @@ -417,6 +417,7 @@ func (dExt *DriverExt) GetScreenResult(options ...ActionOption) (screenResult *S screenResult.Texts = imageResult.OCRResult.ToOCRTexts() screenResult.UploadedURL = imageResult.URL screenResult.Icons = imageResult.UIResult + screenResult.Video = &Video{LiveType: imageResult.LiveType} if actionOptions.ScreenShotWithClosePopups && imageResult.CPResult != nil { screenResult.Popup = &PopupInfo{ diff --git a/hrp/step.go b/hrp/step.go index 88641370..04a21211 100644 --- a/hrp/step.go +++ b/hrp/step.go @@ -16,6 +16,7 @@ const ( type StepResult struct { Name string `json:"name" yaml:"name"` // step name + Identifier string `json:"identifier" yaml:"identifier"` // step identifier StartTime int64 `json:"start_time" yaml:"time"` // step start time StepType StepType `json:"step_type" yaml:"step_type"` // step type, testcase/request/transaction/rendezvous Success bool `json:"success" yaml:"success"` // step execution result diff --git a/hrp/step_mobile_ui.go b/hrp/step_mobile_ui.go index 6cb28be3..12b49ee7 100644 --- a/hrp/step_mobile_ui.go +++ b/hrp/step_mobile_ui.go @@ -599,8 +599,22 @@ func runStepMobileUI(s *SessionRunner, step *TStep) (stepResult *StepResult, err "osType": osType, }) + identifer := mobileStep.Identifier + if mobileStep.Options != nil && identifer == "" { + identifer = mobileStep.Options.Identifier + } + if len(mobileStep.Actions) != 0 && identifer == "" { + for _, action := range mobileStep.Actions { + if action.Identifier != "" { + identifer = action.Identifier + break + } + } + } + stepResult = &StepResult{ Name: step.Name, + Identifier: identifer, StepType: StepType(osType), Success: false, ContentSize: 0,