diff options
Diffstat (limited to 'cases/object')
| -rw-r--r-- | cases/object/test_accounts.py | 232 | ||||
| -rw-r--r-- | cases/object/test_intervals.py | 149 | ||||
| -rw-r--r-- | cases/object/test_tunnels.py | 72 |
3 files changed, 233 insertions, 220 deletions
diff --git a/cases/object/test_accounts.py b/cases/object/test_accounts.py index 6a87d5a0..83946a05 100644 --- a/cases/object/test_accounts.py +++ b/cases/object/test_accounts.py @@ -99,22 +99,22 @@ class TestAccounts: acc.delete(data) #未修改 - @pytest.mark.parametrize("data", [ - { - "ids": "test_reference_by_object", - "Model": "create", - "Type": 0, - "Search type": "Name", - "Name": "", - "Items": [ - "[random]->" - ], - "Description": "" - }, - ]) - def test_reference_by_object(self, demo_fixture, data): - acc = Accounts(demo_fixture) - acc._reference_by_object(data) + # @pytest.mark.parametrize("data", [ + # { + # "ids": "test_reference_by_object", + # "Model": "create", + # "Type": 0, + # "Search type": "Name", + # "Name": "", + # "Items": [ + # "[random]->" + # ], + # "Description": "" + # }, + # ]) + # def test_reference_by_object(self, demo_fixture, data): + # acc = Accounts(demo_fixture) + # acc._reference_by_object(data) def test_operate_columns(self, demo_fixture): acc = Accounts(demo_fixture) acc._operate_columns() @@ -137,9 +137,86 @@ class TestAccounts: # ]) # def test_export_objects_and_verify(self, demo_fixture,data): # acc = Accounts(demo_fixture) - # acc._export_objects_and_verify(data) + acc._export_objects_and_verify(data) # # driver.quit() + @pytest.mark.parametrize("data", + [ + { + "ids": "创建accObject并查看验证Total |T017", + "Model": "create", + "Type": 0, + "Name": "", + "Search type": "", + "Items": [ + "*example->", + "[random]->", + "$acbsuduh->" + ], + "Description": "", + "Subordinate Objects": [ + ], + "SubType": "multi_export", + "multi_type": "all", + }, + { + "ids": "创建accObject并查看验证Total |T017", + "Model": "create", + "Type": 0, + "Name": "", + "Search type": "", + "Items": [ + "*example->", + "[random]->", + "$acbsuduh->" + ], + "Description": "", + "Subordinate Objects": [ + ], + "SubType": "multi_export", + "multi_type": "part", + }, + { + "ids": "创建accObject并查看验证Total |T017", + "Model": "create", + "Type": 0, + "Name": "", + "Search type": "", + "Items": [ + "*example->", + "[random]->", + "$acbsuduh->" + ], + "Description": "", + "Subordinate Objects": [ + ], + "SubType": "multi_export", + "multi_type": " ", + }, + { + "ids": "创建interval_Group--test_View_statistics_case", + "Model": "create", + "Type": 1, + "Search type": "Name", + "Name": "", + "Items": [ + ], + "Description": "", + "Subordinate Objects": { + "subName": "", + "subItems": [ + "^shdjilluhiasdh->" + ], + "subDescription": "" + }, + "SubType": "multi_export", + "multi_type": " ", + }, + ]) + def test_export_multi_condition_test(self, demo_fixture, data): + acc = Accounts(demo_fixture) + acc.export_multi_condition_test(data) + @pytest.mark.parametrize("data", data.read_data_object(r"URLs\\pages_turning.json"), ids=data.generate_id) def test_pages_turning(self, demo_fixture, data): @@ -155,23 +232,23 @@ class TestAccounts: acc._add_to_watchList() #未修改 - @pytest.mark.parametrize("data", [ - { - "ids": "创建urlObject并查看验证审计日志-T016/创建并修改urlObject查看验证审计日志-T041/23.09版本新功能:右侧页面增加Audit Logs功能-T073", - "Model": "create", - "Type": 0, - "Name": "", - "Search type": "", - "Items": [ - "[random]->*asruhau" - ], - "Description": "", - } - ]) - def test_verify_audit_logs(self, demo_fixture, data): - acc = Accounts(demo_fixture) - acc._goto_accountsPage() - acc._verify_audit_logs(data) + # @pytest.mark.parametrize("data", [ + # { + # "ids": "创建urlObject并查看验证审计日志-T016/创建并修改urlObject查看验证审计日志-T041/23.09版本新功能:右侧页面增加Audit Logs功能-T073", + # "Model": "create", + # "Type": 0, + # "Name": "", + # "Search type": "", + # "Items": [ + # "[random]->*asruhau" + # ], + # "Description": "", + # } + # ]) + # def test_verify_audit_logs(self, demo_fixture, data): + # acc = Accounts(demo_fixture) + # acc._goto_accountsPage() + # acc._verify_audit_logs(data) @pytest.mark.parametrize("data", [ @@ -415,22 +492,6 @@ class TestAccounts: "abcd&efgh->" ], "Description": "" - }, { - "ids": "创建Account Group_View_statistics_case", - "Model": "create", - "Type": 1, - "Search type": "Name", - "Name": "test_ui-account group 4 statistics", - "Items": [ - ], - "Description": "", - "Subordinate Objects": { - "subName": "", - "subItems": [ - "iiiii$->" - ], - "subDescription": "" - } }, ]) def test_view_statistics_case(self, demo_fixture, data): @@ -483,40 +544,40 @@ class TestAccounts: acc = Accounts(demo_fixture) acc._onlyViewPermission() - @pytest.mark.parametrize("data", [ - { - "ids": "创建Account,并于列表页筛选Item", - "Model": "create", - "Type": 0, - "Search type": "Name", - "Name": "", - "Items": [ - "[random]->", - "askjdjkj$" - ], - "Description": "" - }, - { - "ids": "创建Account Group,并于列表页筛选Item", - "Model": "create", - "Type": 1, - "Search type": "Name", - "Name": "", - "Items": [ - ], - "Description": "", - "Subordinate Objects": { - "subName": "", - "subItems": [ - "[random]->" - ], - "subDescription": "" - } - } - ]) - def test_list_page_item_search(self, demo_fixture, data): - acc = Accounts(demo_fixture) - acc._list_page_item_search(data) + # @pytest.mark.parametrize("data", [ + # { + # "ids": "创建Account,并于列表页筛选Item", + # "Model": "create", + # "Type": 0, + # "Search type": "Name", + # "Name": "", + # "Items": [ + # "[random]->", + # "askjdjkj$" + # ], + # "Description": "" + # }, + # { + # "ids": "创建Account Group,并于列表页筛选Item", + # "Model": "create", + # "Type": 1, + # "Search type": "Name", + # "Name": "", + # "Items": [ + # ], + # "Description": "", + # "Subordinate Objects": { + # "subName": "", + # "subItems": [ + # "[random]->" + # ], + # "subDescription": "" + # } + # } + # ]) + # def test_list_page_item_search(self, demo_fixture, data): + # acc = Accounts(demo_fixture) + # acc._list_page_item_search(data) @pytest.mark.parametrize("data", [ { @@ -549,7 +610,6 @@ class TestAccounts: "Search type": "Name", "Name": "", "Items": [ - "[random]->", "^skjdjkj$" ], "Description": "" @@ -584,7 +644,7 @@ class TestAccounts: "Model": "create", "Type": 0, "Name": "", - "Search type": "Name&Description&Details", + "Search type": "Name&Description", "Items": [ "[random]->" ], diff --git a/cases/object/test_intervals.py b/cases/object/test_intervals.py index 8a2aac51..d8a109e6 100644 --- a/cases/object/test_intervals.py +++ b/cases/object/test_intervals.py @@ -200,48 +200,48 @@ class TestIntervals: @pytest.mark.parametrize("data", [ - # { - # "ids": "创建accObject并查看验证Total |T017", - # "Model": "create", - # "Type": 0, - # "Name": "", - # "Search type": "", - # "Items": [ - # "[4,54]->", - # ], - # "Description": "", - # "Subordinate Objects": [], - # "SubType": "cancel_export", - # "multi_type": " ", - # }, - # { - # "ids": "创建accObject并查看验证Total |T017", - # "Model": "create", - # "Type": 0, - # "Name": "", - # "Search type": "", - # "Items": [ - # "[4,54]->", - # ], - # "Description": "", - # "Subordinate Objects": [], - # "SubType": "multi_export", - # "multi_type": "all", - # }, - # { - # "ids": "创建accObject并查看验证Total |T017", - # "Model": "create", - # "Type": 0, - # "Name": "", - # "Search type": "", - # "Items": [ - # "[4,54]->", - # ], - # "Description": "", - # "Subordinate Objects": [], - # "SubType": "multi_export", - # "multi_type": "part", - # }, + { + "ids": "创建accObject并查看验证Total |T017", + "Model": "create", + "Type": 0, + "Name": "", + "Search type": "", + "Items": [ + "[4,54]->", + ], + "Description": "", + "Subordinate Objects": [], + "SubType": "cancel_export", + "multi_type": " ", + }, + { + "ids": "创建accObject并查看验证Total |T017", + "Model": "create", + "Type": 0, + "Name": "", + "Search type": "", + "Items": [ + "[4,54]->", + ], + "Description": "", + "Subordinate Objects": [], + "SubType": "multi_export", + "multi_type": "all", + }, + { + "ids": "创建accObject并查看验证Total |T017", + "Model": "create", + "Type": 0, + "Name": "", + "Search type": "", + "Items": [ + "[4,54]->", + ], + "Description": "", + "Subordinate Objects": [], + "SubType": "multi_export", + "multi_type": "part", + }, { "ids": "创建interval_Group--test_View_statistics_case", "Model": "create", @@ -354,48 +354,29 @@ class TestIntervals: # inter = Intervals(demo_fixture) # inter._clear_counter(data) - # @pytest.mark.parametrize("data", [ - # { - # "ids": "创建interval_Objec--test_View_statistics_case", - # "Model": "create", - # "Type": 0, - # "Search type": "", - # "Name": "", - # "Object Statistics": "Elaborate", - # "Items": [ - # "[1,1]->", - # "[11,21]->", - # "[random]->" - # ], - # "Description": "", - # "Subordinate Objects": { - # "subName": "", - # "subItems": [ - # ], - # "subDescription": "" - # } - # }, - # { - # "ids": "创建interval_Group--test_View_statistics_case", - # "Model": "create", - # "Type": 1, - # "Search type": "Name", - # "Name": "test-account group", - # "Items": [ - # ], - # "Description": "", - # "Subordinate Objects": { - # "subName": "", - # "subItems": [ - # "[1,999]->" - # ], - # "subDescription": "" - # } - # }, - # ]) - # def test_view_statistics_case(self, demo_fixture, data): - # inter = Intervals(demo_fixture) - # inter._view_statistics_case(data) + @pytest.mark.parametrize("data", [ + { + "ids": "创建interval_Objec--test_View_statistics_case", + "Model": "create", + "Type": 0, + "Search type": "", + "Name": "", + "Object Statistics": "Elaborate", + "Items": [ + "[1,1]->", + ], + "Description": "", + "Subordinate Objects": { + "subName": "", + "subItems": [ + ], + "subDescription": "" + } + }, + ]) + def test_view_statistics_case(self, demo_fixture, data): + inter = Intervals(demo_fixture) + inter._view_statistics_case(data) @pytest.mark.parametrize("data", [ { diff --git a/cases/object/test_tunnels.py b/cases/object/test_tunnels.py index d29676c0..99dd1360 100644 --- a/cases/object/test_tunnels.py +++ b/cases/object/test_tunnels.py @@ -12,25 +12,6 @@ data = ReadData() class TestTunnels: - # 24.1.3pass - # 测试点:未选中数据时,点击导出按钮可以导出所有数据 - # 改变export定位,24.1.22 pass - # @pytest.mark.parametrize( - # "data", - # [ - # { - # "ids": "Tunnel无法导出,注释", - # "CreatType": "Tunnel", - # "SubType": "ID", - # "Search_type": "Name" - # } - # ] - # ) - # def test_tunnels_verify_checkbox(self, data): - # driver = download_files() - # tunnels = Tunnels(driver) - # tunnels._verify_not_checkbox_export(data) - # driver.quit() # 测试点:增删改查、选择颜色、新建修改后数据是否相同、name最大长度 # 24.1.3 pass @@ -73,19 +54,19 @@ class TestTunnels: # 24.1.22pass # 测试点:Audit Logs审计日志(创建) # Todo 增删 - @pytest.mark.parametrize( - "data", - [ - { - "ids": "Tunnel的Audit Logs:增加和编辑", - "Search_type": "Name", - "type": " " - } - ] - ) - def test_tunnels_audit_case(self, demo_fixture, data): - tunnels = Tunnels(demo_fixture) - tunnels._verify_audit_logs(data) + # @pytest.mark.parametrize( + # "data", + # [ + # { + # "ids": "Tunnel的Audit Logs:增加和编辑", + # "Search_type": "Name", + # "type": " " + # } + # ] + # ) + # def test_tunnels_audit_case(self, demo_fixture, data): + # tunnels = Tunnels(demo_fixture) + # tunnels._verify_audit_logs(data) # 24.1.3pass # 测试点:删除引用数据 @@ -107,9 +88,9 @@ class TestTunnels: tunnels = Tunnels(demo_fixture) tunnels._delete_quoted_object(data) - def test_list_check(self, demo_fixture): - tunnels = Tunnels(demo_fixture) - tunnels._list_check() + # def test_list_check(self, demo_fixture): + # tunnels = Tunnels(demo_fixture) + # tunnels._list_check() @pytest.mark.parametrize( "data", @@ -144,32 +125,25 @@ class TestTunnels: @pytest.mark.parametrize( "data", [ - # Tunnel中新建ip和ip group,之后删除 - { - "ids": "Tunnel中Name模糊查询", - "Search_type": "fuzzy->Name", - "type": "All", - "isDeleteGroup": "True" - }, { "ids": "Tunnel中组合查询", - "Search_type": "ID&Name&IP", + "Search_type": "UUID", "type": "All", "isDeleteGroup": "True" }, { "ids": "Tunnel中根据IP查询", - "Search_type": "IP", + "Search_type": "Name", "type": "IP", "isDeleteGroup": "True" - }, { - "ids": "Tunnel中全局查询", + "ids": "Tunnel中根据IP查询", "Search_type": "IP", - "type": "All", + "type": "IP", "isDeleteGroup": "True" - } + }, + ] ) def test_tunnel_query_case(self, demo_fixture, data): @@ -253,8 +227,6 @@ class TestTunnels: "ids": "modify tunnel时修改tunnel,删除endpoint b", "Search_type": "Name", "type": "IP", - "isDeleteGroup": "True" - } ] ) |
