-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathperfecto.py
More file actions
99 lines (56 loc) · 4.33 KB
/
Copy pathperfecto.py
File metadata and controls
99 lines (56 loc) · 4.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
TOOLS_PREFIX: str = "perfecto"
WEBSITE: str = "https://github.com/PerfectoCode/perfecto-mcp/"
GITHUB: str = "https://github.com/PerfectoCode/perfecto-mcp"
GITHUB_API_LATEST_RELEASE: str = "https://api.github.com/repos/PerfectoCode/perfecto-mcp/releases/latest"
SUPPORT_MESSAGE: str = "If you think this is a bug, please contact Perfecto support or report issue at https://github.com/PerfectoCode/perfecto-mcp/issues"
SECURITY_TOKEN_FILE_ENV_NAME: str = "PERFECTO_SECURITY_TOKEN_FILE"
SECURITY_TOKEN_ENV_NAME: str = "PERFECTO_SECURITY_TOKEN"
PERFECTO_CLOUD_NAME_ENV_NAME: str = 'PERFECTO_CLOUD_NAME'
SECURITY_TOKEN_NOT_SET_MESSAGE: str = f"Perfecto Security Token not set. Set environment variable {SECURITY_TOKEN_FILE_ENV_NAME} or {SECURITY_TOKEN_ENV_NAME}"
PERFECTO_CLOUD_NAME_NOT_SET_MESSAGE: str = f"Perfecto Environment Cloud Name not set. Set environment variable {PERFECTO_CLOUD_NAME_ENV_NAME}"
HELP_TOC_URL = "https://help.perfecto.io/perfecto-help/Data/Tocs/"
HELP_INDEX_URL = f"{HELP_TOC_URL}perfecto_help.js"
HELP_BASE_CONTENT_URL = "https://help.perfecto.io/perfecto-help/content/"
def get_cloud_app_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com"
def get_ai_scriptless_lab_url(cloud_name: str) -> str:
return f"{get_cloud_app_url(cloud_name)}/lab/scriptless-mobile/"
def get_tenant_management_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com/tenant-management-webapp/rest/v1/tenant-management/tenants/current"
def get_user_management_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com/user-management-webapp/rest/v1/user-management"
def get_real_device_management_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com/api/v1/device-management/devices"
def get_execution_management_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.executions.perfectomobile.com/execution-manager/api/v1/executions"
def get_test_execution_management_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com/test-execution-management-webapp/rest/v1/test-execution-management"
def get_test_execution_commands_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com/test-execution-commands-webapp/rest/v1/test-execution-commands"
def get_test_execution_name_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com/test-execution-management-webapp/rest/v1/metadata/search/testExecutionNames"
def get_test_execution_metadata_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com/test-execution-management-webapp/rest/v1/metadata"
def get_report_management_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com/export/api/v3/test-executions"
def get_virtual_device_management_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.perfectomobile.com/vd/api/public/v1/supportedModels"
def get_web_desktop_management_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.perfectomobile.com/web/api/v1/config/devices"
def get_real_devices_extended_commands_help_url() -> str:
return "https://help.perfecto.io/perfecto-help/content/perfecto/automation-testing/perfecto_extensions.htm"
def get_real_devices_extended_command_base_help_url() -> str:
return "https://help.perfecto.io/perfecto-help/content/perfecto/automation-testing/"
def get_ai_scriptless_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com/native-automation-webapp/rest/v1/native-automation"
def get_ai_scriptless_draft_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.app.perfectomobile.com/native-automation-webapp/rest/v1/draft-management/draft"
def get_ai_scriptless_execution_api_url(cloud_name: str) -> str:
return f"https://{cloud_name}.perfectomobile.com/scriptless-mobile-engine/script-executor/api/executions"
def get_ai_scriptless_command_repository_url(cloud_name: str) -> str:
return f"https://{cloud_name}.perfectomobile.com/scriptless-mobile-engine/command-repository/api"
def get_repository_management_api_url(cloud_name: str) -> str:
return (
f"https://{cloud_name}.app.perfectomobile.com"
"/repository-management-webapp/rest/v2/repository-management"
)