mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
Merge branch 'feat/caoshuai.1900/add-identifier' into 'video-release'
chore: identifier See merge request iesqa/httprunner!35
This commit is contained in:
@@ -1 +1 @@
|
||||
v4.3.9
|
||||
v4.3.10
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user