mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
refactor: init CV service
This commit is contained in:
@@ -114,6 +114,10 @@ func (dExt *XTDriver) createScreenshotWithSession(opts ...option.ActionOption) (
|
||||
logger := log.Debug().Str("imagePath", imagePath)
|
||||
// perform CV processing if any CV-related option is enabled
|
||||
if needsCVProcessing(screenshotOptions) {
|
||||
if err = dExt.initCVService(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
imageResult, err := dExt.CVService.ReadFromBuffer(compressBufSource, opts...)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("ReadFromBuffer from ImageService failed")
|
||||
|
||||
Reference in New Issue
Block a user