codemie-test-harness 0.1.139__py3-none-any.whl → 0.1.141__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/__init__.py +2 -20
- codemie_test_harness/tests/conftest.py +39 -0
- codemie_test_harness/tests/utils/notification_utils.py +1 -1
- codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_codebase_tools.py +3 -3
- {codemie_test_harness-0.1.139.dist-info → codemie_test_harness-0.1.141.dist-info}/METADATA +2 -2
- {codemie_test_harness-0.1.139.dist-info → codemie_test_harness-0.1.141.dist-info}/RECORD +8 -8
- {codemie_test_harness-0.1.139.dist-info → codemie_test_harness-0.1.141.dist-info}/WHEEL +0 -0
- {codemie_test_harness-0.1.139.dist-info → codemie_test_harness-0.1.141.dist-info}/entry_points.txt +0 -0
|
@@ -5,31 +5,13 @@ from pathlib import Path
|
|
|
5
5
|
|
|
6
6
|
from dotenv import load_dotenv
|
|
7
7
|
|
|
8
|
-
from codemie_test_harness.tests.utils.aws_parameters_store import AwsParameterStore
|
|
9
8
|
from codemie_test_harness.cli.runner import resolve_tests_path_and_root
|
|
10
9
|
|
|
11
10
|
_, root_dir = resolve_tests_path_and_root()
|
|
12
11
|
env_file_path = Path(root_dir) / ".env"
|
|
13
|
-
load_dotenv(env_file_path)
|
|
14
|
-
|
|
15
|
-
if os.getenv("AWS_ACCESS_KEY") and os.getenv("AWS_SECRET_KEY"):
|
|
16
|
-
aws_parameters_store = AwsParameterStore.get_instance(
|
|
17
|
-
access_key=os.getenv("AWS_ACCESS_KEY"),
|
|
18
|
-
secret_key=os.getenv("AWS_SECRET_KEY"),
|
|
19
|
-
session_token=os.getenv("AWS_SESSION_TOKEN", ""),
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
dotenv = aws_parameters_store.get_parameter(
|
|
23
|
-
f"/codemie/autotests/dotenv/{os.getenv('ENV')}"
|
|
24
|
-
)
|
|
25
12
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
with open(env_file_path, "w") as file:
|
|
29
|
-
file.write(dotenv)
|
|
30
|
-
|
|
31
|
-
# Reload .env file with AWS parameters
|
|
32
|
-
load_dotenv(env_file_path)
|
|
13
|
+
# Load initial .env file
|
|
14
|
+
load_dotenv(env_file_path)
|
|
33
15
|
|
|
34
16
|
LANGFUSE_TRACES_ENABLED = (
|
|
35
17
|
os.getenv("LANGFUSE_TRACES_ENABLED", "false").lower() == "true"
|
|
@@ -4,9 +4,11 @@ import uuid
|
|
|
4
4
|
import atexit
|
|
5
5
|
from time import sleep
|
|
6
6
|
from typing import List, Optional
|
|
7
|
+
from pathlib import Path
|
|
7
8
|
|
|
8
9
|
import pytest
|
|
9
10
|
from requests import HTTPError
|
|
11
|
+
from dotenv import load_dotenv
|
|
10
12
|
|
|
11
13
|
from codemie_sdk.models.assistant import (
|
|
12
14
|
ToolKitDetails,
|
|
@@ -73,6 +75,43 @@ def force_finish_rp_launch():
|
|
|
73
75
|
atexit.register(force_finish_rp_launch)
|
|
74
76
|
|
|
75
77
|
|
|
78
|
+
def pytest_configure(config):
|
|
79
|
+
"""Pytest hook that runs before test collection starts.
|
|
80
|
+
|
|
81
|
+
This hook loads environment variables from .env file and optionally
|
|
82
|
+
retrieves additional configuration from AWS Parameter Store.
|
|
83
|
+
"""
|
|
84
|
+
from codemie_test_harness.cli.runner import resolve_tests_path_and_root
|
|
85
|
+
from codemie_test_harness.tests.utils.aws_parameters_store import AwsParameterStore
|
|
86
|
+
|
|
87
|
+
# Resolve the root directory and .env file path
|
|
88
|
+
_, root_dir = resolve_tests_path_and_root()
|
|
89
|
+
env_file_path = Path(root_dir) / ".env"
|
|
90
|
+
|
|
91
|
+
# Load initial .env file
|
|
92
|
+
load_dotenv(env_file_path)
|
|
93
|
+
|
|
94
|
+
# Check if AWS credentials are available for parameter store
|
|
95
|
+
if os.getenv("AWS_ACCESS_KEY") and os.getenv("AWS_SECRET_KEY"):
|
|
96
|
+
aws_parameters_store = AwsParameterStore.get_instance(
|
|
97
|
+
access_key=os.getenv("AWS_ACCESS_KEY"),
|
|
98
|
+
secret_key=os.getenv("AWS_SECRET_KEY"),
|
|
99
|
+
session_token=os.getenv("AWS_SESSION_TOKEN", ""),
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# Get dotenv configuration from AWS Parameter Store
|
|
103
|
+
dotenv = aws_parameters_store.get_parameter(
|
|
104
|
+
f"/codemie/autotests/dotenv/{os.getenv('ENV')}"
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
# Write the AWS parameters to .env file
|
|
108
|
+
with open(env_file_path, "w") as file:
|
|
109
|
+
file.write(dotenv)
|
|
110
|
+
|
|
111
|
+
# Reload .env file with AWS parameters
|
|
112
|
+
load_dotenv(env_file_path)
|
|
113
|
+
|
|
114
|
+
|
|
76
115
|
@pytest.fixture(scope="session", autouse=True)
|
|
77
116
|
def ensure_rp_cleanup():
|
|
78
117
|
yield
|
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_codebase_tools.py
CHANGED
|
@@ -48,7 +48,7 @@ def test_workflow_with_sonar_tools_direct(
|
|
|
48
48
|
response = workflow_utils.execute_workflow(
|
|
49
49
|
test_workflow.id, assistant_and_state_name, user_input=json.dumps(prompt)
|
|
50
50
|
)
|
|
51
|
-
similarity_check.check_similarity(response, expected_response
|
|
51
|
+
similarity_check.check_similarity(response, expected_response)
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
@pytest.mark.regression
|
|
@@ -87,7 +87,7 @@ def test_workflow_with_sonar_tools_with_hardcoded_args(
|
|
|
87
87
|
response = workflow_utils.execute_workflow(
|
|
88
88
|
test_workflow.id, assistant_and_state_name
|
|
89
89
|
)
|
|
90
|
-
similarity_check.check_similarity(response, expected_response
|
|
90
|
+
similarity_check.check_similarity(response, expected_response)
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
@pytest.mark.regression
|
|
@@ -129,4 +129,4 @@ def test_workflow_with_sonar_tools_with_overriding_args(
|
|
|
129
129
|
response = workflow_utils.execute_workflow(
|
|
130
130
|
test_workflow.id, assistant_and_state_name, user_input=json.dumps(prompt)
|
|
131
131
|
)
|
|
132
|
-
similarity_check.check_similarity(response, expected_response
|
|
132
|
+
similarity_check.check_similarity(response, expected_response)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: codemie-test-harness
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.141
|
|
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.141)
|
|
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-reportportal (>=5.5.2,<6.0.0)
|
|
@@ -9,7 +9,7 @@ codemie_test_harness/cli/constants.py,sha256=956_apPJ4MjhnKo1ZtDooXCd2N89J3vyAB-
|
|
|
9
9
|
codemie_test_harness/cli/runner.py,sha256=5VAL4noqiKrGjo5oYVJKzt4QNmkZFTe1Mw6Mll9uGfc,2349
|
|
10
10
|
codemie_test_harness/cli/utils.py,sha256=NlRa8VFbXTbD74jfUaSqbccGNu2R1dUIg8d5SyDTmIM,1136
|
|
11
11
|
codemie_test_harness/pytest.ini,sha256=Sxr-zVHZ9hJt2Ks0x7xxjh_SA-KhD-vRrDWAfDd9QKs,192
|
|
12
|
-
codemie_test_harness/tests/__init__.py,sha256=
|
|
12
|
+
codemie_test_harness/tests/__init__.py,sha256=QHTa6juBemLqyL8BuYurS1sZgychLiODHmDEOXRNbNU,780
|
|
13
13
|
codemie_test_harness/tests/assistant/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
codemie_test_harness/tests/assistant/datasource/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
codemie_test_harness/tests/assistant/datasource/test_code_datasource.py,sha256=NZmw3efv_FBkyi-1FnkQjNknlg34w4PEFv0rodUvCFw,2599
|
|
@@ -55,7 +55,7 @@ codemie_test_harness/tests/assistant/tools/servicenow/__init__.py,sha256=47DEQpj
|
|
|
55
55
|
codemie_test_harness/tests/assistant/tools/servicenow/test_servicenow_tools.py,sha256=JV_n6COaCsd0_rxQBJvvLZfPdo8BsCbG8Ti-UpzFvfQ,644
|
|
56
56
|
codemie_test_harness/tests/assistant/tools/vcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
57
|
codemie_test_harness/tests/assistant/tools/vcs/test_assistant_with_vcs_tools.py,sha256=5-QybLWmYSqHG4Sqr-IN-vNcStV4skSwCJQN44Nfats,922
|
|
58
|
-
codemie_test_harness/tests/conftest.py,sha256=
|
|
58
|
+
codemie_test_harness/tests/conftest.py,sha256=WL2oDtglcdOEhX7juGeeSuaEZMVBTzEbLsnM6-aKOeM,27954
|
|
59
59
|
codemie_test_harness/tests/e2e/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
60
|
codemie_test_harness/tests/e2e/test_e2e.py,sha256=RUvSu_uNInU1OFfkNft3-Cmd0KZV7JdHqCxSK2ZWXHw,6257
|
|
61
61
|
codemie_test_harness/tests/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -221,7 +221,7 @@ codemie_test_harness/tests/utils/integration_utils.py,sha256=FN9OORtIahATyjzfvwV
|
|
|
221
221
|
codemie_test_harness/tests/utils/json_utils.py,sha256=PWO4Ixxgta_zkdq-8umcP9qwDSi9JFxMuaT2NW3v1eI,226
|
|
222
222
|
codemie_test_harness/tests/utils/llm_utils.py,sha256=JPAlMYh-wQH4any5HWdpQOejCbhjqJCsztRU_fUq-SU,257
|
|
223
223
|
codemie_test_harness/tests/utils/logger_util.py,sha256=6Kca4pLxyTYnUgm2i3j19DdZSH6XUSGXPjHtExx33QU,828
|
|
224
|
-
codemie_test_harness/tests/utils/notification_utils.py,sha256=
|
|
224
|
+
codemie_test_harness/tests/utils/notification_utils.py,sha256=5SKE7Mpef8fG2Li5RRAIHUdR5yKs7A4CozIOFtJ_970,3507
|
|
225
225
|
codemie_test_harness/tests/utils/provider_utils.py,sha256=sgLLVv8j6fzVl6MNESlXTGsHa2WCZYTzlMJepcT3r7o,5117
|
|
226
226
|
codemie_test_harness/tests/utils/pytest_utils.py,sha256=k-mEjX2qpnh37sqKpJqYhZT6BV9974y_KaAhv8Xj9GI,284
|
|
227
227
|
codemie_test_harness/tests/utils/search_utils.py,sha256=SrXiB2d9wiI5ka9bgg0CD73GOX_1mqi2Hz5FBm5DsEU,1435
|
|
@@ -276,7 +276,7 @@ codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_ado_
|
|
|
276
276
|
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_ado_wiki_tools.py,sha256=FOQEqm0u4UvRAfjJFo2API-qySGy4sqKD-hwE1Lm6Js,2744
|
|
277
277
|
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_ado_work_item_tools.py,sha256=4h3z3tUTqBLZPjDQCbnW2CkoGX0gEjZlDkYbLHSilZA,2799
|
|
278
278
|
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_cloud_tools.py,sha256=L6axcgk45OtFhmn9kinalmRv28CRu0YTuqfpYchuR88,3527
|
|
279
|
-
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_codebase_tools.py,sha256=
|
|
279
|
+
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_codebase_tools.py,sha256=Ywhgqqf_FFqJ27tiWuDvUZ1QSixbGBmHcIg1fHlsnFM,3809
|
|
280
280
|
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_data_management_tools.py,sha256=eIIHRovi_tNvINjOVYOQRB9uWIzfebwnDF4fWdx47Og,3899
|
|
281
281
|
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_file_management_tools.py,sha256=W1Q8fwfUzslnMQX7ObM8o1r5kx_GyZTjVGh-1979VNQ,2673
|
|
282
282
|
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_notification_tools.py,sha256=esLfjDk2zGBpqX0D0VJYQKW4qwuvXy1afiFI8PyfMbc,2931
|
|
@@ -323,7 +323,7 @@ codemie_test_harness/tests/workflow/virtual_assistant_tools/servicenow/__init__.
|
|
|
323
323
|
codemie_test_harness/tests/workflow/virtual_assistant_tools/servicenow/test_workflow_with_servicenow_tools.py,sha256=Cxe5Yuy9JE_IEsnQOThpVIZQqpfLuHfDkF6JwLngDc8,890
|
|
324
324
|
codemie_test_harness/tests/workflow/virtual_assistant_tools/vcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
325
325
|
codemie_test_harness/tests/workflow/virtual_assistant_tools/vcs/test_workflow_with_vcs_tools.py,sha256=tm0NvUf_UtzLPTYJWykYpsNoxoVs-Eh80guDmRwImwg,1106
|
|
326
|
-
codemie_test_harness-0.1.
|
|
327
|
-
codemie_test_harness-0.1.
|
|
328
|
-
codemie_test_harness-0.1.
|
|
329
|
-
codemie_test_harness-0.1.
|
|
326
|
+
codemie_test_harness-0.1.141.dist-info/METADATA,sha256=iN0s6nM76OLdmk-_OfqvxCU6s3SricykIZEy-nyVq68,8998
|
|
327
|
+
codemie_test_harness-0.1.141.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
328
|
+
codemie_test_harness-0.1.141.dist-info/entry_points.txt,sha256=n98t-EOM5M1mnMl_j2X4siyeO9zr0WD9a5LF7JyElIM,73
|
|
329
|
+
codemie_test_harness-0.1.141.dist-info/RECORD,,
|
|
File without changes
|
{codemie_test_harness-0.1.139.dist-info → codemie_test_harness-0.1.141.dist-info}/entry_points.txt
RENAMED
|
File without changes
|