@@ -280,7 +280,8 @@
|
||||
"processName": "distributeddata",
|
||||
"acls": [
|
||||
"ohos.permission.MONITOR_DEVICE_NETWORK_STATE",
|
||||
"ohos.permission.GRANT_URI_PERMISSION_PRIVILEGED"
|
||||
"ohos.permission.GRANT_URI_PERMISSION_PRIVILEGED",
|
||||
"ohos.permission.ACCESS_EXT_SYSTEM_ABILITY"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -374,6 +375,13 @@
|
||||
"ohos.permission.HIVIEW_TRACE_MANAGE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"processName": "hiprofilerd",
|
||||
"acls": [
|
||||
"ohos.permission.DUMP",
|
||||
"ohos.permission.GET_BUNDLE_INFO"
|
||||
]
|
||||
},
|
||||
{
|
||||
"processName": "mechbody",
|
||||
"acls": [
|
||||
|
||||
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 219 KiB |
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 177 KiB |
|
Before Width: | Height: | Size: 261 KiB After Width: | Height: | Size: 235 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 193 KiB |
@@ -15,13 +15,17 @@
|
||||
"case_file": "testcases/test_acl_check.py",
|
||||
"description": "外部用例ACL白名单检查"
|
||||
},
|
||||
{
|
||||
"case_file": "testcases/test_note.py",
|
||||
"description": "备忘录应用测试"
|
||||
},
|
||||
{
|
||||
"case_file": "testcases/test_settings_wifi.py",
|
||||
"description": "设置和wlan开关测试"
|
||||
},
|
||||
{
|
||||
"case_file": "testcases/test_crash_check.py",
|
||||
"description": "crash检查"
|
||||
"case_file": "testcases/test_camera.py",
|
||||
"description": "照相机测试"
|
||||
},
|
||||
{
|
||||
"case_file": "testcases/test_photos.py",
|
||||
@@ -39,16 +43,12 @@
|
||||
"case_file": "testcases/test_distributed_musicplayer.py",
|
||||
"description": "音乐测试"
|
||||
},
|
||||
{
|
||||
"case_file": "testcases/test_camera.py",
|
||||
"description": "照相机测试"
|
||||
},
|
||||
{
|
||||
"case_file": "testcases/test_controller_center.py",
|
||||
"description": "控制中心测试"
|
||||
},
|
||||
{
|
||||
"case_file": "testcases/test_note.py",
|
||||
"description": "备忘录应用测试"
|
||||
"case_file": "testcases/test_crash_check.py",
|
||||
"description": "crash检查"
|
||||
}
|
||||
]
|
||||
@@ -17,7 +17,7 @@ class Test:
|
||||
device.save_snapshot_to_local('{}_camera_step1.jpeg'.format(device.sn))
|
||||
|
||||
logging.info('click shot button')
|
||||
device.click(600, 1741)
|
||||
device.click(600, 1598)
|
||||
time.sleep(2)
|
||||
device.save_snapshot_to_local('{}_camera_step2.jpeg'.format(device.sn))
|
||||
|
||||
@@ -30,17 +30,17 @@ class Test:
|
||||
device.save_snapshot_to_local('{}_camera_step3.jpeg'.format(device.sn))
|
||||
|
||||
logging.info('click shot button')
|
||||
device.click(600, 1741)
|
||||
device.click(600, 1598)
|
||||
time.sleep(5)
|
||||
device.save_snapshot_to_local('{}_camera_step4.jpeg'.format(device.sn))
|
||||
|
||||
logging.info('stop recoding')
|
||||
device.click(561, 1741)
|
||||
device.click(600, 1598)
|
||||
time.sleep(3)
|
||||
device.save_snapshot_to_local('{}_camera_step5.jpeg'.format(device.sn))
|
||||
|
||||
logging.info('click left behind button in order to switch to gallery app')
|
||||
device.click(437, 1740)
|
||||
device.click(312, 1598)
|
||||
time.sleep(5)
|
||||
device.save_snapshot_to_local('{}_camera_step6.jpeg'.format(device.sn))
|
||||
device.assert_process_running(self.photo_bundle_name)
|
||||
|
||||
@@ -23,7 +23,6 @@ import pytest
|
||||
|
||||
class Test:
|
||||
pid_list = [
|
||||
'com.ohos.launcher',
|
||||
'render_service',
|
||||
]
|
||||
|
||||
@@ -68,7 +67,6 @@ class Test:
|
||||
'wifi_host',
|
||||
'usb_host',
|
||||
'blue_host',
|
||||
'com.ohos.systemui',
|
||||
'power_host',
|
||||
]
|
||||
|
||||
|
||||
@@ -401,6 +401,7 @@ class Device:
|
||||
self.hdc_file_recv(tmp_file, self.report_path)
|
||||
|
||||
# 根据实际屏幕分辨率裁剪截图
|
||||
logging.info(f'截图分辨率: {self.width}x{self.height}')
|
||||
crop_picture(save_file, self.width, self.height)
|
||||
return save_file
|
||||
|
||||
|
||||
@@ -18,12 +18,11 @@ def crop_picture(picture, width=720, height=1280):
|
||||
img_height, img_width = img.shape[:2]
|
||||
|
||||
# 顶部状态栏、底部导航栏需要去除的高度
|
||||
status_bar_height = 120
|
||||
navigation_bar_height = 1800
|
||||
status_bar_height = 90
|
||||
|
||||
# 裁剪去除状态栏,保留完整屏幕内容
|
||||
x1, y1 = 0, status_bar_height
|
||||
x2, y2 = img_width, navigation_bar_height
|
||||
x2, y2 = img_width, img_height
|
||||
|
||||
img = img[y1:y2, x1:x2]
|
||||
cv2.imwrite(picture, img)
|
||||
|
||||