mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
fix: resolve conflicts
This commit is contained in:
@@ -59,7 +59,10 @@ func TestDevice_Product(t *testing.T) {
|
||||
|
||||
for i := range devices {
|
||||
dev := devices[i]
|
||||
product := dev.Product()
|
||||
product, err := dev.Product()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(dev.Serial(), product)
|
||||
}
|
||||
}
|
||||
@@ -69,7 +72,24 @@ func TestDevice_Model(t *testing.T) {
|
||||
|
||||
for i := range devices {
|
||||
dev := devices[i]
|
||||
t.Log(dev.Serial(), dev.Model())
|
||||
model, err := dev.Model()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(dev.Serial(), model)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDevice_Brand(t *testing.T) {
|
||||
setupDevices(t)
|
||||
|
||||
for i := range devices {
|
||||
dev := devices[i]
|
||||
brand, err := dev.Brand()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(dev.Serial(), brand)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +98,15 @@ func TestDevice_Usb(t *testing.T) {
|
||||
|
||||
for i := range devices {
|
||||
dev := devices[i]
|
||||
t.Log(dev.Serial(), dev.Usb(), dev.IsUsb())
|
||||
usb, err := dev.Usb()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
isUsb, err := dev.IsUsb()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(dev.Serial(), usb, isUsb)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,8 +123,7 @@ func TestDevice_Forward(t *testing.T) {
|
||||
setupDevices(t)
|
||||
|
||||
for _, device := range devices {
|
||||
localPort := 61000
|
||||
err := device.Forward(localPort, 6790)
|
||||
localPort, err := device.Forward(6790)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -314,6 +341,22 @@ func TestDevice_InstallAPK(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestDevice_ListPackages(t *testing.T) {
|
||||
setupDevices(t)
|
||||
for _, dev := range devices {
|
||||
res, err := dev.ListPackages()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(res)
|
||||
installed := dev.IsPackagesInstalled("io.appium.uiautomator2.server")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(installed)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDevice_HasFeature(t *testing.T) {
|
||||
setupDevices(t)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user