mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-05 05:26:55 +08:00
feat: 支持设备探活
This commit is contained in:
@@ -114,6 +114,14 @@ func (dev *AndroidDevice) Setup() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (dev *AndroidDevice) IsHealthy() (bool, error) {
|
||||
state, err := dev.Device.State()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return state == gadb.StateOnline, nil
|
||||
}
|
||||
|
||||
func (dev *AndroidDevice) Teardown() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user