codemie-test-harness 0.1.208__py3-none-any.whl → 0.1.210__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of codemie-test-harness might be problematic. Click here for more details.
- codemie_test_harness/tests/swagger/__init__.py +0 -0
- codemie_test_harness/tests/swagger/test_swagger_endpoint.py +105 -0
- codemie_test_harness/tests/ui/assistants/test_edit_assistant.py +8 -6
- codemie_test_harness/tests/ui/pageobject/assistants/assistant_mcp_server.py +3 -1
- codemie_test_harness/tests/ui/pageobject/assistants/create_edit_assistant_page.py +4 -2
- codemie_test_harness/tests/ui/test_data/assistant_test_data.py +2 -0
- {codemie_test_harness-0.1.208.dist-info → codemie_test_harness-0.1.210.dist-info}/METADATA +2 -2
- {codemie_test_harness-0.1.208.dist-info → codemie_test_harness-0.1.210.dist-info}/RECORD +10 -8
- {codemie_test_harness-0.1.208.dist-info → codemie_test_harness-0.1.210.dist-info}/WHEEL +0 -0
- {codemie_test_harness-0.1.208.dist-info → codemie_test_harness-0.1.210.dist-info}/entry_points.txt +0 -0
|
File without changes
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"""
|
|
2
|
+
API tests for Swagger documentation endpoint.
|
|
3
|
+
|
|
4
|
+
This module tests the health and accessibility of the Swagger/OpenAPI documentation endpoint.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
|
|
9
|
+
import pytest
|
|
10
|
+
import requests
|
|
11
|
+
from hamcrest import assert_that, equal_to, is_in, less_than
|
|
12
|
+
|
|
13
|
+
# Module-level constants
|
|
14
|
+
CODEMIE_API_DOMAIN = os.getenv("CODEMIE_API_DOMAIN")
|
|
15
|
+
SWAGGER_URL = f"{CODEMIE_API_DOMAIN}/docs"
|
|
16
|
+
OPENAPI_JSON_URL = f"{CODEMIE_API_DOMAIN}/openapi.json"
|
|
17
|
+
VERIFY_SSL = os.getenv("VERIFY_SSL", "True").lower() == "true"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@pytest.mark.api
|
|
21
|
+
@pytest.mark.smoke
|
|
22
|
+
def test_swagger_endpoint_is_accessible():
|
|
23
|
+
"""
|
|
24
|
+
Test that the Swagger documentation endpoint is accessible and returns a successful response.
|
|
25
|
+
|
|
26
|
+
The test verifies:
|
|
27
|
+
1. The endpoint responds with HTTP 200 status code
|
|
28
|
+
2. The endpoint is reachable and healthy
|
|
29
|
+
"""
|
|
30
|
+
response = requests.get(SWAGGER_URL, verify=VERIFY_SSL)
|
|
31
|
+
|
|
32
|
+
assert_that(response.status_code, equal_to(200))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@pytest.mark.api
|
|
36
|
+
@pytest.mark.smoke
|
|
37
|
+
def test_swagger_endpoint_returns_html():
|
|
38
|
+
"""
|
|
39
|
+
Test that the Swagger documentation endpoint returns HTML content.
|
|
40
|
+
|
|
41
|
+
The test verifies:
|
|
42
|
+
1. The response content type is HTML
|
|
43
|
+
2. The response contains expected Swagger/OpenAPI keywords
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
response = requests.get(SWAGGER_URL, verify=VERIFY_SSL)
|
|
47
|
+
|
|
48
|
+
assert_that(response.status_code, equal_to(200))
|
|
49
|
+
|
|
50
|
+
content_type = response.headers.get("Content-Type", "")
|
|
51
|
+
assert_that("text/html", is_in(content_type))
|
|
52
|
+
|
|
53
|
+
# Verify the response contains Swagger/OpenAPI related content
|
|
54
|
+
content = response.text.lower()
|
|
55
|
+
keywords = ["swagger", "openapi", "api", "docs"]
|
|
56
|
+
assert_that(any(keyword in content for keyword in keywords), equal_to(True))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@pytest.mark.api
|
|
60
|
+
@pytest.mark.smoke
|
|
61
|
+
def test_swagger_endpoint_response_time():
|
|
62
|
+
"""
|
|
63
|
+
Test that the Swagger documentation endpoint responds within acceptable time.
|
|
64
|
+
|
|
65
|
+
The test verifies:
|
|
66
|
+
1. The endpoint responds within 5 seconds
|
|
67
|
+
"""
|
|
68
|
+
timeout = 5 # seconds
|
|
69
|
+
|
|
70
|
+
try:
|
|
71
|
+
response = requests.get(SWAGGER_URL, verify=VERIFY_SSL, timeout=timeout)
|
|
72
|
+
assert_that(response.status_code, equal_to(200))
|
|
73
|
+
assert_that(response.elapsed.total_seconds(), less_than(timeout))
|
|
74
|
+
except requests.exceptions.Timeout:
|
|
75
|
+
pytest.fail(f"Swagger endpoint did not respond within {timeout} seconds")
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
@pytest.mark.api
|
|
79
|
+
@pytest.mark.smoke
|
|
80
|
+
def test_openapi_json_endpoint(client):
|
|
81
|
+
"""
|
|
82
|
+
Test that the OpenAPI JSON endpoint returns valid JSON with expected metadata.
|
|
83
|
+
|
|
84
|
+
The test verifies:
|
|
85
|
+
1. The endpoint responds with HTTP 200 status code
|
|
86
|
+
2. The response is valid JSON
|
|
87
|
+
3. The info.title field equals "Codemie"
|
|
88
|
+
4. The info.description field equals "Smart AI assistant 'CodeMie'"
|
|
89
|
+
"""
|
|
90
|
+
headers = {"Authorization": f"Bearer {client.token}"}
|
|
91
|
+
response = requests.get(OPENAPI_JSON_URL, headers=headers, verify=VERIFY_SSL)
|
|
92
|
+
|
|
93
|
+
assert_that(response.status_code, equal_to(200))
|
|
94
|
+
|
|
95
|
+
# Verify response is valid JSON
|
|
96
|
+
openapi_spec = response.json()
|
|
97
|
+
|
|
98
|
+
# Verify info.title
|
|
99
|
+
assert_that(openapi_spec.get("info", {}).get("title"), equal_to("Codemie"))
|
|
100
|
+
|
|
101
|
+
# Verify info.description
|
|
102
|
+
assert_that(
|
|
103
|
+
openapi_spec.get("info", {}).get("description"),
|
|
104
|
+
equal_to("Smart AI assistant 'CodeMie'"),
|
|
105
|
+
)
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import pytest
|
|
2
|
-
from tests import TEST_USER, PROJECT
|
|
3
|
-
from tests.ui.pageobject.assistants.assistant_view_page import
|
|
2
|
+
from codemie_test_harness.tests import TEST_USER, PROJECT
|
|
3
|
+
from codemie_test_harness.tests.ui.pageobject.assistants.assistant_view_page import (
|
|
4
|
+
AssistantViewPage,
|
|
5
|
+
)
|
|
4
6
|
|
|
5
|
-
from tests.ui.pageobject.assistants.assistants_page import (
|
|
7
|
+
from codemie_test_harness.tests.ui.pageobject.assistants.assistants_page import (
|
|
6
8
|
AssistantsPage,
|
|
7
9
|
)
|
|
8
10
|
from codemie_test_harness.tests.ui.test_data.assistant_test_data import (
|
|
@@ -12,15 +14,15 @@ from codemie_test_harness.tests.ui.test_data.assistant_test_data import (
|
|
|
12
14
|
)
|
|
13
15
|
|
|
14
16
|
|
|
15
|
-
from tests.ui.test_data.assistant_test_data import (
|
|
17
|
+
from codemie_test_harness.tests.ui.test_data.assistant_test_data import (
|
|
16
18
|
TOOLKIT_TOOLS,
|
|
17
19
|
AssistantPopUpMessages,
|
|
18
20
|
AssistantValidationErrors,
|
|
19
21
|
)
|
|
20
|
-
from tests.ui.pageobject.assistants.create_edit_assistant_page import (
|
|
22
|
+
from codemie_test_harness.tests.ui.pageobject.assistants.create_edit_assistant_page import (
|
|
21
23
|
CreateEditAssistantPage,
|
|
22
24
|
)
|
|
23
|
-
from tests.utils.base_utils import get_random_name
|
|
25
|
+
from codemie_test_harness.tests.utils.base_utils import get_random_name
|
|
24
26
|
|
|
25
27
|
|
|
26
28
|
@pytest.mark.assistant_ui
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from playwright.sync_api import Page, Locator, expect
|
|
2
2
|
from reportportal_client import step
|
|
3
|
-
from tests.ui.test_data.assistant_test_data import
|
|
3
|
+
from codemie_test_harness.tests.ui.test_data.assistant_test_data import (
|
|
4
|
+
get_minimal_assistant_mcp_config_data,
|
|
5
|
+
)
|
|
4
6
|
|
|
5
7
|
|
|
6
8
|
class AssistantMCPIntegrationModal:
|
|
@@ -7,10 +7,12 @@ from codemie_test_harness.tests.ui.pageobject.assistants.generate_with_ai_modal
|
|
|
7
7
|
AIAssistantGeneratorPage,
|
|
8
8
|
)
|
|
9
9
|
from codemie_test_harness.tests.ui.pageobject.base_page import BasePage
|
|
10
|
-
from tests.ui.pageobject.assistants.assistant_mcp_server import (
|
|
10
|
+
from codemie_test_harness.tests.ui.pageobject.assistants.assistant_mcp_server import (
|
|
11
11
|
AssistantMCPIntegrationModal,
|
|
12
12
|
)
|
|
13
|
-
from tests.ui.pageobject.assistants.assistant_sidebar import
|
|
13
|
+
from codemie_test_harness.tests.ui.pageobject.assistants.assistant_sidebar import (
|
|
14
|
+
AssistantSidebar,
|
|
15
|
+
)
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
class CreateEditAssistantPage(BasePage):
|
|
@@ -252,6 +252,8 @@ COMMON_ICON_URLS = {
|
|
|
252
252
|
|
|
253
253
|
ICON_URL = "https://raw.githubusercontent.com/epam-gen-ai-run/ai-run-install/main/docs/assets/ai/AQAUiTestGenerator.png"
|
|
254
254
|
|
|
255
|
+
GENERAL_PROMPT = "You are a helpful integration test assistant"
|
|
256
|
+
|
|
255
257
|
|
|
256
258
|
# ==================== ASSISTANT TOOLS CONSTANTS ====================
|
|
257
259
|
class Section(Enum):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: codemie-test-harness
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.210
|
|
4
4
|
Summary: Autotest for CodeMie backend and UI
|
|
5
5
|
Author: Anton Yeromin
|
|
6
6
|
Author-email: anton_yeromin@epam.com
|
|
@@ -13,7 +13,7 @@ Requires-Dist: aws-assume-role-lib (>=2.10.0,<3.0.0)
|
|
|
13
13
|
Requires-Dist: boto3 (>=1.39.8,<2.0.0)
|
|
14
14
|
Requires-Dist: click (>=8.1.7,<9.0.0)
|
|
15
15
|
Requires-Dist: codemie-plugins (>=0.1.123,<0.2.0)
|
|
16
|
-
Requires-Dist: codemie-sdk-python (==0.1.
|
|
16
|
+
Requires-Dist: codemie-sdk-python (==0.1.210)
|
|
17
17
|
Requires-Dist: pytest (>=8.4.1,<9.0.0)
|
|
18
18
|
Requires-Dist: pytest-playwright (>=0.7.0,<0.8.0)
|
|
19
19
|
Requires-Dist: pytest-repeat (>=0.9.3,<0.10.0)
|
|
@@ -101,6 +101,8 @@ codemie_test_harness/tests/service/test_task_service.py,sha256=q2RaZbNooWraONLFC
|
|
|
101
101
|
codemie_test_harness/tests/service/test_user_service.py,sha256=NqSsxOLTGg7p7juHLFP6StEs2Qx_wfct9R7F83pe2JU,1135
|
|
102
102
|
codemie_test_harness/tests/service/test_workflow_execution_service.py,sha256=pHV7WXvQKzpw0wMn6aHVZ01g7yZupmU5NXLVE9rIKjo,5419
|
|
103
103
|
codemie_test_harness/tests/service/test_workflow_service.py,sha256=QyxtorhaCI1oE2D1OLx7X7jAlBv0kwwFpQztvV1nUus,8152
|
|
104
|
+
codemie_test_harness/tests/swagger/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
105
|
+
codemie_test_harness/tests/swagger/test_swagger_endpoint.py,sha256=rMfZD1HfCkZqxXKzeIH8MTAIMp8qkhAb2-UHrrt_Gn4,3244
|
|
104
106
|
codemie_test_harness/tests/test_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
105
107
|
codemie_test_harness/tests/test_data/ado_test_plan_tools_test_data.py,sha256=Al5u4HNfrcoj-b072uEGsqUqjKqwXLGJXKQ0QeJT3PI,5778
|
|
106
108
|
codemie_test_harness/tests/test_data/ado_wiki_tools_test_data.py,sha256=xvgEja5vE0l41sP4fE0stdFLQ0M201FWynOCEcRYufE,3188
|
|
@@ -199,7 +201,7 @@ codemie_test_harness/tests/test_data/workflow_validation_messages.py,sha256=zg5B
|
|
|
199
201
|
codemie_test_harness/tests/ui/__init__.py,sha256=Xqfl0zEG1wUyz8Qm4ZsFqmkp7KtZv91xtxkm-ue4SQ4,22
|
|
200
202
|
codemie_test_harness/tests/ui/assistants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
201
203
|
codemie_test_harness/tests/ui/assistants/test_create_assistant.py,sha256=3ilai5C9IspcVrVLLEXY1a0-r9guzwS41zKRBJtLam0,14354
|
|
202
|
-
codemie_test_harness/tests/ui/assistants/test_edit_assistant.py,sha256=
|
|
204
|
+
codemie_test_harness/tests/ui/assistants/test_edit_assistant.py,sha256=0kfLyan6riNgD1hUJaUsHgyrClvT_e_otsu6IQu93rk,7071
|
|
203
205
|
codemie_test_harness/tests/ui/chats/conftest.py,sha256=0we4CT71wycq2B1aPi0DrLo5IAtHFV-HSzhGd0GoQaE,389
|
|
204
206
|
codemie_test_harness/tests/ui/chats/test_chat_configuration.py,sha256=9nmHA_fzxvL5ALEUkhRie9hNUPmrDNhnmfFxxyZCFG0,7152
|
|
205
207
|
codemie_test_harness/tests/ui/chats/test_chat_functionality.py,sha256=DLql4eYXOW_mbmvHtcWqbgdhc3agCglDi7jjxF8fjGg,7675
|
|
@@ -213,11 +215,11 @@ codemie_test_harness/tests/ui/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW
|
|
|
213
215
|
codemie_test_harness/tests/ui/integrations/test_create_integration.py,sha256=esndMHGdpJbKEjHNd8fvhhzWD0W5-wEhmlF0hiRwXnw,11934
|
|
214
216
|
codemie_test_harness/tests/ui/pageobject/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
215
217
|
codemie_test_harness/tests/ui/pageobject/assistants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
216
|
-
codemie_test_harness/tests/ui/pageobject/assistants/assistant_mcp_server.py,sha256=
|
|
218
|
+
codemie_test_harness/tests/ui/pageobject/assistants/assistant_mcp_server.py,sha256=gjHZ8BLLQ9Fn_QGNqMCzO6BdK1IWvHmuT847-vmuYRE,5297
|
|
217
219
|
codemie_test_harness/tests/ui/pageobject/assistants/assistant_sidebar.py,sha256=xlPgQUfCmOl4GzKOaqzlnm5F7f0DGOi94Wl3XOZT3JY,4871
|
|
218
220
|
codemie_test_harness/tests/ui/pageobject/assistants/assistant_view_page.py,sha256=XhLNg30iYzeFwCCWhyg8B-_7x7dODT5Us6eMsJ4E90Y,8879
|
|
219
221
|
codemie_test_harness/tests/ui/pageobject/assistants/assistants_page.py,sha256=V53oJfxcg2g_X5oajOCWbk6NNvAzVugE7FtX-2ImCAg,8093
|
|
220
|
-
codemie_test_harness/tests/ui/pageobject/assistants/create_edit_assistant_page.py,sha256=
|
|
222
|
+
codemie_test_harness/tests/ui/pageobject/assistants/create_edit_assistant_page.py,sha256=GcdM4slcLzYrgXegCjXDDznxn41QLBSJ_SduVAtfOjk,32372
|
|
221
223
|
codemie_test_harness/tests/ui/pageobject/assistants/generate_with_ai_modal.py,sha256=rsavzWxmawKzI4wHxixp49IN6m_ZUZNFTJTSnE8jBr8,13732
|
|
222
224
|
codemie_test_harness/tests/ui/pageobject/base_page.py,sha256=z8jqR_qqcwI0kMkcigG68KK3zWjMUbx0DWSFu2d7WsQ,9073
|
|
223
225
|
codemie_test_harness/tests/ui/pageobject/chats/chat_page.py,sha256=MoviVb9JAeXWX15GtqLxrH4KOR8DmWhrCztpWWtum4M,21307
|
|
@@ -253,7 +255,7 @@ codemie_test_harness/tests/ui/pageobject/workflows/workflow_template_details.py,
|
|
|
253
255
|
codemie_test_harness/tests/ui/pageobject/workflows/workflow_templates_page.py,sha256=J5jxdZ2aQ9k15ghyRKYACxX2F9NiR6dXYBw0EaYlaN0,2645
|
|
254
256
|
codemie_test_harness/tests/ui/pageobject/workflows/workflows_page.py,sha256=yqdaSTA4aUeD-8A9Or0OgJZhMr2tDvDWWP_f4uPL5dw,11186
|
|
255
257
|
codemie_test_harness/tests/ui/test_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
256
|
-
codemie_test_harness/tests/ui/test_data/assistant_test_data.py,sha256=
|
|
258
|
+
codemie_test_harness/tests/ui/test_data/assistant_test_data.py,sha256=oPH2nYWOD1-Np5cFZiD52VYoZOPWDwWDv1qhlrPdKTw,17369
|
|
257
259
|
codemie_test_harness/tests/ui/test_data/chat_test_data.py,sha256=QEic3RgHxKy2dZhbLL9412r0uvYb1kQ0KPm2yzEZ-oU,2966
|
|
258
260
|
codemie_test_harness/tests/ui/test_data/datasource_test_data.py,sha256=Ubx8o1NPxiJ2adaz6IDpwXDKB9_yE40v5_0az__CX0I,3489
|
|
259
261
|
codemie_test_harness/tests/ui/test_data/integration_test_data.py,sha256=6YnDIWhOSTSmzIziBCfpqYikVT0kXw_vMrMJBmhnSnQ,4212
|
|
@@ -398,7 +400,7 @@ codemie_test_harness/tests/workflow/virtual_assistant_tools/servicenow/__init__.
|
|
|
398
400
|
codemie_test_harness/tests/workflow/virtual_assistant_tools/servicenow/test_workflow_with_servicenow_tools.py,sha256=D835gaRbCnB4va5mi9TdA_u9StSpGXQ_fgzwW0S2pwo,1173
|
|
399
401
|
codemie_test_harness/tests/workflow/virtual_assistant_tools/vcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
400
402
|
codemie_test_harness/tests/workflow/virtual_assistant_tools/vcs/test_workflow_with_vcs_tools.py,sha256=Se9imIiBYuJU78m1pLu0g4ZmHygKZjr6JjIWkGXTy1Q,1364
|
|
401
|
-
codemie_test_harness-0.1.
|
|
402
|
-
codemie_test_harness-0.1.
|
|
403
|
-
codemie_test_harness-0.1.
|
|
404
|
-
codemie_test_harness-0.1.
|
|
403
|
+
codemie_test_harness-0.1.210.dist-info/METADATA,sha256=31wxZU4HEtBcQXMDenu3M_VQUjMt54iv0koJLupa054,27184
|
|
404
|
+
codemie_test_harness-0.1.210.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
405
|
+
codemie_test_harness-0.1.210.dist-info/entry_points.txt,sha256=n98t-EOM5M1mnMl_j2X4siyeO9zr0WD9a5LF7JyElIM,73
|
|
406
|
+
codemie_test_harness-0.1.210.dist-info/RECORD,,
|
|
File without changes
|
{codemie_test_harness-0.1.208.dist-info → codemie_test_harness-0.1.210.dist-info}/entry_points.txt
RENAMED
|
File without changes
|