codemie-test-harness 0.1.179__py3-none-any.whl → 0.1.181__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.

Files changed (134) hide show
  1. codemie_test_harness/cli/cli.py +2 -0
  2. codemie_test_harness/cli/commands/marks_cmd.py +39 -0
  3. codemie_test_harness/cli/marks_utils.py +338 -0
  4. codemie_test_harness/cli/runner.py +40 -0
  5. codemie_test_harness/tests/assistant/datasource/test_code_datasource.py +20 -7
  6. codemie_test_harness/tests/assistant/datasource/test_confluence_datasource.py +20 -7
  7. codemie_test_harness/tests/assistant/datasource/test_file_indexing.py +20 -9
  8. codemie_test_harness/tests/assistant/datasource/test_google_datasource.py +21 -7
  9. codemie_test_harness/tests/assistant/datasource/test_jira_datasource.py +22 -9
  10. codemie_test_harness/tests/assistant/default_integrations/test_default_integrations_for_tool.py +29 -13
  11. codemie_test_harness/tests/assistant/default_integrations/test_default_integrations_for_tool_kit.py +29 -13
  12. codemie_test_harness/tests/assistant/default_integrations/test_default_integrations_for_tool_with_datasource.py +29 -13
  13. codemie_test_harness/tests/assistant/test_assistants.py +53 -35
  14. codemie_test_harness/tests/assistant/tools/access_management/test_keycloak_tool.py +7 -2
  15. codemie_test_harness/tests/assistant/tools/ado/test_assistant_for_ado_test_plan_tools.py +39 -11
  16. codemie_test_harness/tests/assistant/tools/ado/test_assistant_for_ado_wiki_tools.py +27 -8
  17. codemie_test_harness/tests/assistant/tools/ado/test_assistant_for_ado_work_item_tools.py +27 -7
  18. codemie_test_harness/tests/assistant/tools/cloud/test_cloud_tools.py +9 -3
  19. codemie_test_harness/tests/assistant/tools/codebase/test_codebase_tools.py +13 -4
  20. codemie_test_harness/tests/assistant/tools/datamanagement/test_assistant_with_data_management_tools.py +32 -11
  21. codemie_test_harness/tests/assistant/tools/filemanagement/test_assistant_with_file_management_tools.py +37 -12
  22. codemie_test_harness/tests/assistant/tools/git/test_assistant_with_git_tools.py +48 -17
  23. codemie_test_harness/tests/assistant/tools/mcp/test_cli_mcp_server.py +16 -9
  24. codemie_test_harness/tests/assistant/tools/mcp/test_mcp_servers.py +14 -8
  25. codemie_test_harness/tests/assistant/tools/notification/test_assistant_notification_tools.py +11 -4
  26. codemie_test_harness/tests/assistant/tools/openapi/test_assistant_with_open_api_tools.py +6 -2
  27. codemie_test_harness/tests/assistant/tools/plugin/test_assistant_with_development_plugin.py +27 -8
  28. codemie_test_harness/tests/assistant/tools/plugin/test_assistant_with_plugin_and_mcp_servers.py +17 -5
  29. codemie_test_harness/tests/assistant/tools/plugin/test_single_assistant_dual_time_plugins.py +12 -3
  30. codemie_test_harness/tests/assistant/tools/project_management/test_assistant_pm_tools.py +36 -17
  31. codemie_test_harness/tests/assistant/tools/report_portal/test_assistant_report_portal_tools.py +7 -2
  32. codemie_test_harness/tests/assistant/tools/research/test_assistant_research_tools.py +17 -5
  33. codemie_test_harness/tests/assistant/tools/servicenow/test_servicenow_tools.py +6 -2
  34. codemie_test_harness/tests/assistant/tools/vcs/test_assistant_with_vcs_tools.py +7 -2
  35. codemie_test_harness/tests/conversations/test_conversations_endpoints.py +5 -5
  36. codemie_test_harness/tests/e2e/test_e2e.py +6 -6
  37. codemie_test_harness/tests/enums/tools.py +32 -0
  38. codemie_test_harness/tests/integrations/project/test_default_integrations.py +14 -14
  39. codemie_test_harness/tests/integrations/project/test_project_integrations.py +9 -9
  40. codemie_test_harness/tests/integrations/user/test_default_integrations.py +14 -14
  41. codemie_test_harness/tests/integrations/user/test_user_integrations.py +12 -12
  42. codemie_test_harness/tests/llm/assistants/test_lite_llm.py +2 -2
  43. codemie_test_harness/tests/llm/assistants/test_llm.py +3 -3
  44. codemie_test_harness/tests/providers/test_providers_endpoints.py +11 -11
  45. codemie_test_harness/tests/search/test_search_assistant.py +1 -1
  46. codemie_test_harness/tests/search/test_search_datasource.py +5 -5
  47. codemie_test_harness/tests/search/test_search_integration.py +2 -2
  48. codemie_test_harness/tests/search/test_search_workflow.py +1 -1
  49. codemie_test_harness/tests/service/test_assistant_service.py +1 -1
  50. codemie_test_harness/tests/test_data/codebase_tools_test_data.py +11 -5
  51. codemie_test_harness/tests/test_data/file_test_data.py +17 -0
  52. codemie_test_harness/tests/ui/assistants/test_create_assistant.py +11 -11
  53. codemie_test_harness/tests/ui/datasource/test_create_datasource.py +7 -7
  54. codemie_test_harness/tests/ui/datasource/test_datasource_page.py +3 -3
  55. codemie_test_harness/tests/ui/datasource/test_edit_datasource.py +5 -5
  56. codemie_test_harness/tests/ui/datasource/test_view_datasource.py +5 -5
  57. codemie_test_harness/tests/ui/integrations/test_create_integration.py +9 -9
  58. codemie_test_harness/tests/ui/workflows/test_create_workflow.py +12 -12
  59. codemie_test_harness/tests/ui/workflows/test_edit_workflow.py +15 -15
  60. codemie_test_harness/tests/ui/workflows/test_workflow_details.py +19 -19
  61. codemie_test_harness/tests/ui/workflows/test_workflow_executions_page.py +36 -36
  62. codemie_test_harness/tests/ui/workflows/test_workflow_templates.py +8 -8
  63. codemie_test_harness/tests/ui/workflows/test_workflows.py +8 -8
  64. codemie_test_harness/tests/utils/assistant_utils.py +34 -1
  65. codemie_test_harness/tests/utils/base_utils.py +61 -0
  66. codemie_test_harness/tests/workflow/assistant_tools/access_management/test_workflow_with_assistant_with_keycloak_tool.py +1 -1
  67. codemie_test_harness/tests/workflow/assistant_tools/ado/test_workflow_with_assistant_with_ado_test_plan_tools.py +2 -2
  68. codemie_test_harness/tests/workflow/assistant_tools/ado/test_workflow_with_assistant_with_ado_wiki_tools.py +2 -2
  69. codemie_test_harness/tests/workflow/assistant_tools/ado/test_workflow_with_assistant_with_ado_work_item_tools.py +2 -2
  70. codemie_test_harness/tests/workflow/assistant_tools/cloud/test_workflow_with_assistant_cloud_tools.py +1 -1
  71. codemie_test_harness/tests/workflow/assistant_tools/codebase/test_worfklow_with_assistant_codebase_tools.py +2 -2
  72. codemie_test_harness/tests/workflow/assistant_tools/data_management/test_workflow_with_assistant_with_data_management_tools.py +2 -2
  73. codemie_test_harness/tests/workflow/assistant_tools/default_integrations/test_default_integrations_for_tool.py +8 -8
  74. codemie_test_harness/tests/workflow/assistant_tools/default_integrations/test_default_integrations_for_tool_kit.py +8 -8
  75. codemie_test_harness/tests/workflow/assistant_tools/default_integrations/test_default_integrations_for_tool_with_datasource.py +8 -8
  76. codemie_test_harness/tests/workflow/assistant_tools/file_management/test_workflow_with_assistant_with_file_management_tools.py +5 -5
  77. codemie_test_harness/tests/workflow/assistant_tools/git/test_workflow_with_assistant_git_tools.py +7 -7
  78. codemie_test_harness/tests/workflow/assistant_tools/mcp/test_workflow_with_assistant_with_mcp_server.py +3 -3
  79. codemie_test_harness/tests/workflow/assistant_tools/notification/test_workflow_with_assistant_notification_tools.py +2 -2
  80. codemie_test_harness/tests/workflow/assistant_tools/open_api/test_workflow_with_assistant_with_open_api_tools.py +1 -1
  81. codemie_test_harness/tests/workflow/assistant_tools/plugin/test_workflow_with_assistant_with_development_plugin.py +2 -2
  82. codemie_test_harness/tests/workflow/assistant_tools/plugin/test_workflow_with_assistant_with_plugin_and_mcp_servers.py +2 -2
  83. codemie_test_harness/tests/workflow/assistant_tools/project_management/test_workflow_with_assistant_pm_tools.py +1 -1
  84. codemie_test_harness/tests/workflow/assistant_tools/report_portal/test_workflow_with_assistant_with_report_portal_tools.py +1 -1
  85. codemie_test_harness/tests/workflow/assistant_tools/research/test_workflow_with_assistant_research_tools.py +2 -2
  86. codemie_test_harness/tests/workflow/assistant_tools/servicenow/test_workflow_with_servicenow_tools.py +1 -1
  87. codemie_test_harness/tests/workflow/assistant_tools/vcs/workflow_with_assistant_vcs_tools.py +1 -1
  88. codemie_test_harness/tests/workflow/config_validation/test_config_validation.py +1 -1
  89. codemie_test_harness/tests/workflow/direct_tools_calling/default_integrations/test_default_integrations_for_tool.py +8 -8
  90. codemie_test_harness/tests/workflow/direct_tools_calling/default_integrations/test_default_integrations_for_tool_kit.py +8 -8
  91. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_access_management_tool.py +3 -3
  92. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_ado_test_plan_tools.py +3 -3
  93. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_ado_wiki_tools.py +3 -3
  94. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_ado_work_item_tools.py +3 -3
  95. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_cloud_tools.py +3 -3
  96. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_codebase_tools.py +3 -3
  97. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_data_management_tools_elastic.py +3 -3
  98. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_data_management_tools_sql.py +3 -3
  99. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_file_management_tools.py +3 -3
  100. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_notification_tools.py +3 -3
  101. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_open_api_tools.py +3 -3
  102. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_plugin_tools.py +4 -4
  103. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_project_management_tools.py +3 -3
  104. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_report_portal_tools.py +3 -3
  105. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_research_tools.py +3 -3
  106. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_servicenow_tools.py +3 -3
  107. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_vcs_tools.py +3 -3
  108. codemie_test_harness/tests/workflow/test_workflows.py +1 -1
  109. codemie_test_harness/tests/workflow/virtual_assistant_tools/access_management/test_workflow_with_keycloak_tool.py +1 -1
  110. codemie_test_harness/tests/workflow/virtual_assistant_tools/ado/test_workflow_with_ado_test_plan_tools.py +2 -2
  111. codemie_test_harness/tests/workflow/virtual_assistant_tools/ado/test_workflow_with_ado_wiki_tools.py +2 -2
  112. codemie_test_harness/tests/workflow/virtual_assistant_tools/ado/test_workflow_with_ado_work_item_tools.py +2 -2
  113. codemie_test_harness/tests/workflow/virtual_assistant_tools/cloud/test_workflow_with_cloud_tools.py +4 -4
  114. codemie_test_harness/tests/workflow/virtual_assistant_tools/codebase/test_workflow_with_codebase_tools.py +2 -2
  115. codemie_test_harness/tests/workflow/virtual_assistant_tools/data_management/test_workflow_with_data_management_tools.py +2 -2
  116. codemie_test_harness/tests/workflow/virtual_assistant_tools/default_integrations/test_default_integrations_for_tool.py +8 -8
  117. codemie_test_harness/tests/workflow/virtual_assistant_tools/default_integrations/test_default_integrations_for_tool_kit.py +8 -8
  118. codemie_test_harness/tests/workflow/virtual_assistant_tools/default_integrations/test_default_integrations_for_tool_with_datasource.py +8 -8
  119. codemie_test_harness/tests/workflow/virtual_assistant_tools/file_management/test_workflow_with_file_management_tools.py +5 -5
  120. codemie_test_harness/tests/workflow/virtual_assistant_tools/git/test_workflow_with_git_tools.py +7 -7
  121. codemie_test_harness/tests/workflow/virtual_assistant_tools/mcp/test_workflow_with_mcp_server.py +3 -3
  122. codemie_test_harness/tests/workflow/virtual_assistant_tools/notification/test_workflow_with_notification_tools.py +4 -4
  123. codemie_test_harness/tests/workflow/virtual_assistant_tools/open_api/test_workflow_with_open_api_tools.py +2 -2
  124. codemie_test_harness/tests/workflow/virtual_assistant_tools/plugin/test_workflow_with_development_plugin.py +2 -2
  125. codemie_test_harness/tests/workflow/virtual_assistant_tools/plugin/test_workflow_with_plugin_and_mcp_servers.py +2 -2
  126. codemie_test_harness/tests/workflow/virtual_assistant_tools/project_management/test_workflow_with_project_management_tools.py +2 -2
  127. codemie_test_harness/tests/workflow/virtual_assistant_tools/report_portal/test_workflow_with_report_portal_tool.py +1 -1
  128. codemie_test_harness/tests/workflow/virtual_assistant_tools/research/test_workflow_with_research_tools.py +2 -2
  129. codemie_test_harness/tests/workflow/virtual_assistant_tools/servicenow/test_workflow_with_servicenow_tools.py +1 -1
  130. codemie_test_harness/tests/workflow/virtual_assistant_tools/vcs/test_workflow_with_vcs_tools.py +1 -1
  131. {codemie_test_harness-0.1.179.dist-info → codemie_test_harness-0.1.181.dist-info}/METADATA +8 -8
  132. {codemie_test_harness-0.1.179.dist-info → codemie_test_harness-0.1.181.dist-info}/RECORD +134 -132
  133. {codemie_test_harness-0.1.179.dist-info → codemie_test_harness-0.1.181.dist-info}/WHEEL +0 -0
  134. {codemie_test_harness-0.1.179.dist-info → codemie_test_harness-0.1.181.dist-info}/entry_points.txt +0 -0
@@ -2,18 +2,19 @@ import os
2
2
 
3
3
  import pytest
4
4
 
5
- from codemie_test_harness.tests.enums.tools import Toolkit
5
+ from codemie_test_harness.tests.enums.tools import Toolkit, CliMcpServer, PluginTool
6
6
  from codemie_test_harness.tests.test_data.mcp_server_test_data import (
7
7
  cli_mcp_server_with_plugin_test_data,
8
8
  filesystem_mcp_server_with_plugin_test_data,
9
9
  )
10
10
  from codemie_test_harness.tests.utils.constants import TESTS_PATH
11
+ from codemie_test_harness.tests.utils.base_utils import assert_tool_triggered
11
12
 
12
13
 
13
14
  @pytest.mark.assistant
14
15
  @pytest.mark.plugin
15
16
  @pytest.mark.mcp
16
- @pytest.mark.regression
17
+ @pytest.mark.api
17
18
  @pytest.mark.parametrize(
18
19
  "prompt,expected_response",
19
20
  cli_mcp_server_with_plugin_test_data,
@@ -29,14 +30,19 @@ def test_assistant_with_plugin_and_cli_mcp_server(
29
30
  ):
30
31
  assistant = assistant(Toolkit.PLUGIN, Toolkit.PLUGIN, settings=cli_server)
31
32
 
32
- response = assistant_utils.ask_assistant(assistant, prompt)
33
+ response, triggered_tools = assistant_utils.ask_assistant(
34
+ assistant, prompt, minimal_response=False
35
+ )
36
+
37
+ assert_tool_triggered(CliMcpServer.RUN_COMMAND, triggered_tools)
38
+
33
39
  similarity_check.check_similarity(response, expected_response)
34
40
 
35
41
 
36
42
  @pytest.mark.assistant
37
43
  @pytest.mark.plugin
38
44
  @pytest.mark.mcp
39
- @pytest.mark.regression
45
+ @pytest.mark.api
40
46
  @pytest.mark.parametrize(
41
47
  "prompt,expected_response,tool_name",
42
48
  filesystem_mcp_server_with_plugin_test_data,
@@ -56,7 +62,13 @@ def test_assistant_with_plugin_and_filesystem_mcp_server(
56
62
  Toolkit.PLUGIN, Toolkit.PLUGIN, settings=filesystem_server
57
63
  )
58
64
 
59
- response = assistant_utils.ask_assistant(assistant, prompt)
65
+ response, triggered_tools = assistant_utils.ask_assistant(
66
+ assistant, prompt, minimal_response=False
67
+ )
68
+
69
+ if tool_name != PluginTool.READ_FILE:
70
+ assert_tool_triggered(tool_name, triggered_tools)
71
+
60
72
  similarity_check.check_similarity(response, expected_response)
61
73
  finally:
62
74
  file_to_remove = f"{str(TESTS_PATH / 'sdk_tests')}.properties"
@@ -13,13 +13,14 @@ from typing import Tuple, List
13
13
 
14
14
  import pytest
15
15
 
16
- from codemie_test_harness.tests.enums.tools import Toolkit
16
+ from codemie_test_harness.tests.enums.tools import Toolkit, McpServerTime
17
17
  from codemie_sdk.models.integration import CredentialTypes
18
18
  from codemie_test_harness.tests.conftest import cleanup_plugin_process
19
19
  from codemie_test_harness.tests.test_data.plugin_tools_test_data import (
20
20
  dual_time_plugin_test_data,
21
21
  )
22
22
  from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
23
+ from codemie_test_harness.tests.utils.base_utils import assert_tool_triggered
23
24
 
24
25
 
25
26
  CACHE_DIR = Path.home() / ".cache" / "uv" / "archive-v0"
@@ -144,7 +145,7 @@ def dual_time_plugins(integration_utils):
144
145
  @pytest.mark.assistant
145
146
  @pytest.mark.mcp
146
147
  @pytest.mark.plugin
147
- @pytest.mark.regression
148
+ @pytest.mark.api
148
149
  @pytest.mark.parametrize(
149
150
  "prompt,expected_response",
150
151
  dual_time_plugin_test_data,
@@ -162,5 +163,13 @@ def test_single_assistant_dual_time_plugins(
162
163
  Toolkit.PLUGIN, Toolkit.PLUGIN, settings=dual_time_plugins
163
164
  )
164
165
 
165
- response = assistant_utils.ask_assistant(assistant_instance, prompt)
166
+ response, triggered_tools = assistant_utils.ask_assistant(
167
+ assistant_instance, prompt, minimal_response=False
168
+ )
169
+
170
+ if "tools" in prompt.lower():
171
+ pass
172
+ else:
173
+ assert_tool_triggered(McpServerTime.GET_CURRENT_TIME, triggered_tools)
174
+
166
175
  similarity_check.check_similarity(response, expected_response)
@@ -14,7 +14,10 @@ from codemie_test_harness.tests.test_data.project_management_test_data import (
14
14
  pm_tools_test_data,
15
15
  )
16
16
  from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
17
- from codemie_test_harness.tests.utils.base_utils import credentials_to_dict
17
+ from codemie_test_harness.tests.utils.base_utils import (
18
+ credentials_to_dict,
19
+ assert_tool_triggered,
20
+ )
18
21
  from codemie_test_harness.tests.utils.constants import (
19
22
  project_management_integrations,
20
23
  )
@@ -22,7 +25,7 @@ from codemie_test_harness.tests.utils.constants import (
22
25
 
23
26
  @pytest.mark.assistant
24
27
  @pytest.mark.project_management
25
- @pytest.mark.regression
28
+ @pytest.mark.api
26
29
  @pytest.mark.parametrize(
27
30
  "tool_name, integration_type, prompt, expected_response",
28
31
  pm_tools_test_data,
@@ -48,14 +51,17 @@ def test_assistant_with_project_management_tools(
48
51
  settings=integration,
49
52
  )
50
53
 
51
- response = assistant_utils.ask_assistant(assistant, prompt)
54
+ response, triggered_tools = assistant_utils.ask_assistant(
55
+ assistant, prompt, minimal_response=False
56
+ )
57
+ assert_tool_triggered(tool_name, triggered_tools)
52
58
  similarity_check.check_similarity(response, expected_response)
53
59
 
54
60
 
55
61
  @pytest.mark.assistant
56
62
  @pytest.mark.project_management
57
63
  @pytest.mark.jira
58
- @pytest.mark.regression
64
+ @pytest.mark.api
59
65
  def test_assistant_with_jira_tool_and_integration_id_in_chat(
60
66
  assistant, assistant_utils, integration_utils, similarity_check, jira_integration
61
67
  ):
@@ -72,16 +78,17 @@ def test_assistant_with_jira_tool_and_integration_id_in_chat(
72
78
  settings=invalid_settings,
73
79
  )
74
80
 
75
- response = assistant_utils.ask_assistant(
76
- assistant, JIRA_TOOL_PROMPT, tools_config=[tool_config]
81
+ response, triggered_tools = assistant_utils.ask_assistant(
82
+ assistant, JIRA_TOOL_PROMPT, tools_config=[tool_config], minimal_response=False
77
83
  )
84
+ assert_tool_triggered(ProjectManagementTool.JIRA, triggered_tools)
78
85
  similarity_check.check_similarity(response, RESPONSE_FOR_JIRA_TOOL)
79
86
 
80
87
 
81
88
  @pytest.mark.assistant
82
89
  @pytest.mark.project_management
83
90
  @pytest.mark.jira
84
- @pytest.mark.regression
91
+ @pytest.mark.api
85
92
  def test_assistant_with_jira_tool_and_credentials_in_chat(
86
93
  assistant, assistant_utils, integration_utils, similarity_check
87
94
  ):
@@ -95,16 +102,17 @@ def test_assistant_with_jira_tool_and_credentials_in_chat(
95
102
  ProjectManagementTool.JIRA,
96
103
  )
97
104
 
98
- response = assistant_utils.ask_assistant(
99
- assistant, JIRA_TOOL_PROMPT, tools_config=[tool_config]
105
+ response, triggered_tools = assistant_utils.ask_assistant(
106
+ assistant, JIRA_TOOL_PROMPT, tools_config=[tool_config], minimal_response=False
100
107
  )
108
+ assert_tool_triggered(ProjectManagementTool.JIRA, triggered_tools)
101
109
  similarity_check.check_similarity(response, RESPONSE_FOR_JIRA_TOOL)
102
110
 
103
111
 
104
112
  @pytest.mark.assistant
105
113
  @pytest.mark.project_management
106
114
  @pytest.mark.confluence
107
- @pytest.mark.regression
115
+ @pytest.mark.api
108
116
  def test_assistant_with_confluence_tool_and_integration_id_in_chat(
109
117
  assistant,
110
118
  assistant_utils,
@@ -125,16 +133,20 @@ def test_assistant_with_confluence_tool_and_integration_id_in_chat(
125
133
  settings=invalid_settings,
126
134
  )
127
135
 
128
- response = assistant_utils.ask_assistant(
129
- assistant, CONFLUENCE_TOOL_PROMPT, tools_config=[tool_config]
136
+ response, triggered_tools = assistant_utils.ask_assistant(
137
+ assistant,
138
+ CONFLUENCE_TOOL_PROMPT,
139
+ tools_config=[tool_config],
140
+ minimal_response=False,
130
141
  )
142
+ assert_tool_triggered(ProjectManagementTool.CONFLUENCE, triggered_tools)
131
143
  similarity_check.check_similarity(response, RESPONSE_FOR_CONFLUENCE_TOOL)
132
144
 
133
145
 
134
146
  @pytest.mark.assistant
135
147
  @pytest.mark.project_management
136
148
  @pytest.mark.confluence
137
- @pytest.mark.regression
149
+ @pytest.mark.api
138
150
  def test_assistant_with_confluence_tool_and_credentials_in_chat(
139
151
  assistant, assistant_utils, integration_utils, similarity_check
140
152
  ):
@@ -145,23 +157,30 @@ def test_assistant_with_confluence_tool_and_credentials_in_chat(
145
157
 
146
158
  assistant = assistant(Toolkit.PROJECT_MANAGEMENT, ProjectManagementTool.CONFLUENCE)
147
159
 
148
- response = assistant_utils.ask_assistant(
149
- assistant, CONFLUENCE_TOOL_PROMPT, tools_config=[tool_config]
160
+ response, triggered_tools = assistant_utils.ask_assistant(
161
+ assistant,
162
+ CONFLUENCE_TOOL_PROMPT,
163
+ tools_config=[tool_config],
164
+ minimal_response=False,
150
165
  )
166
+ assert_tool_triggered(ProjectManagementTool.CONFLUENCE, triggered_tools)
151
167
  similarity_check.check_similarity(response, RESPONSE_FOR_CONFLUENCE_TOOL)
152
168
 
153
169
 
154
170
  @pytest.mark.assistant
155
171
  @pytest.mark.project_management
156
172
  @pytest.mark.confluence
157
- @pytest.mark.regression
173
+ @pytest.mark.api
158
174
  @pytest.mark.skip(reason="Test should be fixed")
159
175
  def test_assistant_with_confluence_tool_and_without_credentials(
160
176
  assistant, assistant_utils, similarity_check
161
177
  ):
162
178
  assistant = assistant(Toolkit.PROJECT_MANAGEMENT, ProjectManagementTool.CONFLUENCE)
163
179
 
164
- response = assistant_utils.ask_assistant(assistant, CONFLUENCE_TOOL_PROMPT)
180
+ response, triggered_tools = assistant_utils.ask_assistant(
181
+ assistant, CONFLUENCE_TOOL_PROMPT, minimal_response=False
182
+ )
183
+ assert_tool_triggered(ProjectManagementTool.CONFLUENCE, triggered_tools)
165
184
  similarity_check.check_similarity(
166
185
  response, RESPONSE_FOR_CONFLUENCE_TOOL_UNAUTHORIZED
167
186
  )
@@ -3,11 +3,12 @@ import pytest
3
3
  from codemie_test_harness.tests.test_data.report_portal_tools_test_data import (
4
4
  rp_test_data,
5
5
  )
6
+ from codemie_test_harness.tests.utils.base_utils import assert_tool_triggered
6
7
 
7
8
 
8
9
  @pytest.mark.assistant
9
10
  @pytest.mark.report_portal
10
- @pytest.mark.regression
11
+ @pytest.mark.api
11
12
  @pytest.mark.parametrize(
12
13
  "toolkit,tool_name,prompt,expected_response",
13
14
  rp_test_data,
@@ -28,5 +29,9 @@ def test_assistant_with_report_portal_tools(
28
29
  tool_name,
29
30
  settings=report_portal_integration,
30
31
  )
31
- response = assistant_utils.ask_assistant(assistant, prompt)
32
+ response, triggered_tools = assistant_utils.ask_assistant(
33
+ assistant, prompt, minimal_response=False
34
+ )
35
+
36
+ assert_tool_triggered(tool_name, triggered_tools)
32
37
  similarity_check.check_similarity(response, expected_response)
@@ -6,12 +6,15 @@ from codemie_test_harness.tests.test_data.research_tools_test_data import (
6
6
  search_tools_test_data,
7
7
  interactions_tools_test_data,
8
8
  )
9
- from codemie_test_harness.tests.utils.base_utils import percent_of_relevant_titles
9
+ from codemie_test_harness.tests.utils.base_utils import (
10
+ percent_of_relevant_titles,
11
+ assert_tool_triggered,
12
+ )
10
13
 
11
14
 
12
15
  @pytest.mark.assistant
13
16
  @pytest.mark.research
14
- @pytest.mark.regression
17
+ @pytest.mark.api
15
18
  @pytest.mark.parametrize(
16
19
  "tool_name,prompt,expected_percentage",
17
20
  search_tools_test_data,
@@ -26,7 +29,11 @@ def test_assistant_with_search_tools(
26
29
  ):
27
30
  assistant = assistant(Toolkit.RESEARCH, tool_name)
28
31
 
29
- response = assistant_utils.ask_assistant(assistant, prompt)
32
+ response, triggered_tools = assistant_utils.ask_assistant(
33
+ assistant, prompt, minimal_response=False
34
+ )
35
+
36
+ assert_tool_triggered(tool_name, triggered_tools)
30
37
 
31
38
  percent = percent_of_relevant_titles(response)
32
39
 
@@ -39,7 +46,7 @@ def test_assistant_with_search_tools(
39
46
 
40
47
  @pytest.mark.assistant
41
48
  @pytest.mark.research
42
- @pytest.mark.regression
49
+ @pytest.mark.api
43
50
  @pytest.mark.parametrize(
44
51
  "tool_name,prompt,expected_response",
45
52
  interactions_tools_test_data,
@@ -55,5 +62,10 @@ def test_assistant_with_interaction_tools(
55
62
  ):
56
63
  assistant = assistant(Toolkit.RESEARCH, tool_name)
57
64
 
58
- response = assistant_utils.ask_assistant(assistant, prompt)
65
+ response, triggered_tools = assistant_utils.ask_assistant(
66
+ assistant, prompt, minimal_response=False
67
+ )
68
+
69
+ assert_tool_triggered(tool_name, triggered_tools)
70
+
59
71
  similarity_check.check_similarity(response, expected_response)
@@ -5,11 +5,12 @@ from codemie_test_harness.tests.test_data.servicenow_tools_test_data import (
5
5
  PROMPT,
6
6
  EXPECTED_RESPONSE,
7
7
  )
8
+ from codemie_test_harness.tests.utils.base_utils import assert_tool_triggered
8
9
 
9
10
 
10
11
  @pytest.mark.assistant
11
12
  @pytest.mark.servicenow
12
- @pytest.mark.regression
13
+ @pytest.mark.api
13
14
  def test_assistant_with_servicenow_tools(
14
15
  assistant_utils,
15
16
  assistant,
@@ -20,6 +21,9 @@ def test_assistant_with_servicenow_tools(
20
21
  Toolkit.SERVICENOW, ServiceNowTool.SERVICE_NOW, settings=service_now_integration
21
22
  )
22
23
 
23
- response = assistant_utils.ask_assistant(servicenow_assistant, PROMPT)
24
+ response, triggered_tools = assistant_utils.ask_assistant(
25
+ servicenow_assistant, PROMPT, minimal_response=False
26
+ )
24
27
 
28
+ assert_tool_triggered(ServiceNowTool.SERVICE_NOW, triggered_tools)
25
29
  similarity_check.check_similarity(response, EXPECTED_RESPONSE, 80)
@@ -6,12 +6,13 @@ from codemie_test_harness.tests.enums.tools import (
6
6
  from codemie_test_harness.tests.test_data.vcs_tools_test_data import (
7
7
  vcs_tools_test_data,
8
8
  )
9
+ from codemie_test_harness.tests.utils.base_utils import assert_tool_triggered
9
10
  from codemie_test_harness.tests.utils.constants import vcs_integrations
10
11
 
11
12
 
12
13
  @pytest.mark.assistant
13
14
  @pytest.mark.vcs
14
- @pytest.mark.regression
15
+ @pytest.mark.api
15
16
  @pytest.mark.testcase("EPMCDME-5803, EPMCDME-5804")
16
17
  @pytest.mark.parametrize(
17
18
  "tool_name,prompt,expected_response",
@@ -31,6 +32,10 @@ def test_create_assistant_with_vcs_tool(
31
32
 
32
33
  assistant = assistant(Toolkit.VCS, tool_name, settings=integration)
33
34
 
34
- response = assistant_utils.ask_assistant(assistant, prompt)
35
+ response, triggered_tools = assistant_utils.ask_assistant(
36
+ assistant, prompt, minimal_response=False
37
+ )
38
+
39
+ assert_tool_triggered(tool_name, triggered_tools)
35
40
 
36
41
  similarity_check.check_similarity(response, expected_response)
@@ -17,7 +17,7 @@ from codemie_test_harness.tests.utils.base_utils import get_random_name
17
17
 
18
18
  @pytest.mark.assistant
19
19
  @pytest.mark.conversations
20
- @pytest.mark.regression
20
+ @pytest.mark.api
21
21
  def test_list_conversations(assistant, assistant_utils, conversation_utils):
22
22
  assistant = assistant()
23
23
  assistant_utils.ask_assistant(assistant, f"prompt {get_random_name()}")
@@ -45,7 +45,7 @@ def test_list_conversations(assistant, assistant_utils, conversation_utils):
45
45
 
46
46
  @pytest.mark.assistant
47
47
  @pytest.mark.conversations
48
- @pytest.mark.regression
48
+ @pytest.mark.api
49
49
  def test_get_specific_conversation(assistant, assistant_utils, conversation_utils):
50
50
  prompt = f"prompt {get_random_name()}"
51
51
  assistant = assistant()
@@ -69,7 +69,7 @@ def test_get_specific_conversation(assistant, assistant_utils, conversation_util
69
69
 
70
70
  @pytest.mark.assistant
71
71
  @pytest.mark.conversations
72
- @pytest.mark.regression
72
+ @pytest.mark.api
73
73
  def test_get_conversation_by_assistant_id(
74
74
  assistant, assistant_utils, conversation_utils
75
75
  ):
@@ -92,7 +92,7 @@ def test_get_conversation_by_assistant_id(
92
92
 
93
93
  @pytest.mark.assistant
94
94
  @pytest.mark.conversations
95
- @pytest.mark.regression
95
+ @pytest.mark.api
96
96
  def test_delete_conversation(assistant, assistant_utils, conversation_utils):
97
97
  prompt = f"prompt {get_random_name()}"
98
98
  assistant = assistant()
@@ -110,7 +110,7 @@ def test_delete_conversation(assistant, assistant_utils, conversation_utils):
110
110
 
111
111
  @pytest.mark.assistant
112
112
  @pytest.mark.conversations
113
- @pytest.mark.regression
113
+ @pytest.mark.api
114
114
  def test_get_non_existent_conversation(assistant, assistant_utils, conversation_utils):
115
115
  invalid_id = get_random_name()
116
116
  with pytest.raises(Exception) as exc_info:
@@ -35,7 +35,7 @@ def git_integration(integration_utils):
35
35
  @pytest.mark.assistant
36
36
  @pytest.mark.code_kb
37
37
  @pytest.mark.e2e
38
- @pytest.mark.regression
38
+ @pytest.mark.api
39
39
  def test_assistant_with_code_kb(
40
40
  assistant_utils, code_datasource, default_llm, similarity_check
41
41
  ):
@@ -59,7 +59,7 @@ def test_assistant_with_code_kb(
59
59
  @pytest.mark.vcs
60
60
  @pytest.mark.gitlab
61
61
  @pytest.mark.e2e
62
- @pytest.mark.regression
62
+ @pytest.mark.api
63
63
  @pytest.mark.skipif(
64
64
  os.getenv("GIT_ENV") == "github",
65
65
  reason="Test is skipped when GIT_ENV is set to github",
@@ -93,7 +93,7 @@ def test_assistant_with_vcs_gitlab_tool(
93
93
  @pytest.mark.vcs
94
94
  @pytest.mark.github
95
95
  @pytest.mark.e2e
96
- @pytest.mark.regression
96
+ @pytest.mark.api
97
97
  @pytest.mark.skipif(
98
98
  os.getenv("GIT_ENV") == "gitlab",
99
99
  reason="Test is skipped when GIT_ENV is set to gitlab",
@@ -126,7 +126,7 @@ def test_assistant_with_vcs_github_tool(
126
126
  @pytest.mark.assistant
127
127
  @pytest.mark.gitlab
128
128
  @pytest.mark.e2e
129
- @pytest.mark.regression
129
+ @pytest.mark.api
130
130
  def test_assistant_with_list_branches_tool(
131
131
  assistant_utils, code_datasource, default_llm, similarity_check
132
132
  ):
@@ -158,7 +158,7 @@ def test_assistant_with_list_branches_tool(
158
158
  @pytest.mark.jira
159
159
  @pytest.mark.project_management
160
160
  @pytest.mark.e2e
161
- @pytest.mark.regression
161
+ @pytest.mark.api
162
162
  def test_assistant_with_jira_kb(
163
163
  assistant_utils, jira_datasource, default_llm, similarity_check
164
164
  ):
@@ -184,7 +184,7 @@ def test_assistant_with_jira_kb(
184
184
  @pytest.mark.confluence
185
185
  @pytest.mark.project_management
186
186
  @pytest.mark.e2e
187
- @pytest.mark.regression
187
+ @pytest.mark.api
188
188
  def test_assistant_with_confluence_kb(
189
189
  assistant_utils, confluence_datasource, default_llm, similarity_check
190
190
  ):
@@ -199,3 +199,35 @@ class ReportPortalTool(str, Enum):
199
199
  GET_LOGS_FOR_TEST_ITEM = "get_logs_for_test_item"
200
200
  GET_USER_INFORMATION = "get_user_information"
201
201
  GET_DASHBOARD_DATA = "get_dashboard_data"
202
+
203
+
204
+ class McpServerTime(str, Enum):
205
+ """Enum for Time MCP Server tool names."""
206
+
207
+ GET_CURRENT_TIME = "get_current_time"
208
+ CONVERT_TIME = "convert_time"
209
+
210
+
211
+ class CliMcpServer(str, Enum):
212
+ """Enum for Cli MCP Server tool names."""
213
+
214
+ RUN_COMMAND = "run command"
215
+
216
+
217
+ class McpServerFetch(str, Enum):
218
+ """Enum for MCP Server Fetch tool names."""
219
+
220
+ FETCH = "fetch"
221
+
222
+
223
+ class Default(str, Enum):
224
+ """Enum for tools that attached automatically e.g. on added datasource or file uploaded."""
225
+
226
+ GET_REPOSITORY_FILE_TREE = "get_repository_file_tree"
227
+ SEARCH_KB = "search_kb"
228
+ FILE_ANALYSIS = "file_analysis"
229
+ DOCX_TOOL = "docx_tool"
230
+ EXCEL_TOOL = "excel_tool"
231
+ PYTHON_REPL_AST = "python_repl_ast"
232
+ PPTX_TOOL = "pptx_tool"
233
+ PDF_TOOL = "pdf_tool"
@@ -53,8 +53,8 @@ pytestmark = pytest.mark.skipif(
53
53
  @pytest.mark.integration
54
54
  @pytest.mark.project_integration
55
55
  @pytest.mark.default_integration
56
- @pytest.mark.regression
57
- @pytest.mark.tescase("EPMCDME-2377")
56
+ @pytest.mark.api
57
+ @pytest.mark.testcase("EPMCDME-2377")
58
58
  @pytest.mark.parametrize(
59
59
  "toolkit, tool_name, credential_type, credentials, prompt, expected_response",
60
60
  cloud_test_data,
@@ -97,8 +97,8 @@ def test_assistant_with_default_integration_cloud(
97
97
  @pytest.mark.integration
98
98
  @pytest.mark.project_integration
99
99
  @pytest.mark.default_integration
100
- @pytest.mark.regression
101
- @pytest.mark.tescase("EPMCDME-2377")
100
+ @pytest.mark.api
101
+ @pytest.mark.testcase("EPMCDME-2377")
102
102
  def test_assistant_with_default_integration_ado(
103
103
  general_integration,
104
104
  integration_utils,
@@ -135,8 +135,8 @@ def test_assistant_with_default_integration_ado(
135
135
  @pytest.mark.integration
136
136
  @pytest.mark.project_integration
137
137
  @pytest.mark.default_integration
138
- @pytest.mark.regression
139
- @pytest.mark.tescase("EPMCDME-2377")
138
+ @pytest.mark.api
139
+ @pytest.mark.testcase("EPMCDME-2377")
140
140
  @pytest.mark.parametrize(
141
141
  "toolkit, tool_name, credentials, prompt, expected_response",
142
142
  sonar_tools_test_data,
@@ -180,8 +180,8 @@ def test_assistant_with_default_integration_codebase(
180
180
  @pytest.mark.integration
181
181
  @pytest.mark.project_integration
182
182
  @pytest.mark.default_integration
183
- @pytest.mark.regression
184
- @pytest.mark.tescase("EPMCDME-2377")
183
+ @pytest.mark.api
184
+ @pytest.mark.testcase("EPMCDME-2377")
185
185
  def test_assistant_with_default_integration_git(
186
186
  general_integration,
187
187
  integration_utils,
@@ -234,8 +234,8 @@ def test_assistant_with_default_integration_git(
234
234
  @pytest.mark.integration
235
235
  @pytest.mark.project_integration
236
236
  @pytest.mark.default_integration
237
- @pytest.mark.regression
238
- @pytest.mark.tescase("EPMCDME-2377")
237
+ @pytest.mark.api
238
+ @pytest.mark.testcase("EPMCDME-2377")
239
239
  def test_assistant_with_default_integration_jira(
240
240
  general_integration,
241
241
  integration_utils,
@@ -273,8 +273,8 @@ def test_assistant_with_default_integration_jira(
273
273
  @pytest.mark.integration
274
274
  @pytest.mark.project_integration
275
275
  @pytest.mark.default_integration
276
- @pytest.mark.regression
277
- @pytest.mark.tescase("EPMCDME-2377")
276
+ @pytest.mark.api
277
+ @pytest.mark.testcase("EPMCDME-2377")
278
278
  def test_assistant_with_default_integration_email(
279
279
  general_integration,
280
280
  integration_utils,
@@ -309,7 +309,7 @@ def test_assistant_with_default_integration_email(
309
309
  @pytest.mark.integration
310
310
  @pytest.mark.project_integration
311
311
  @pytest.mark.default_integration
312
- @pytest.mark.regression
312
+ @pytest.mark.api
313
313
  def test_assistant_with_default_integration_keycloak(
314
314
  general_integration,
315
315
  integration_utils,
@@ -346,7 +346,7 @@ def test_assistant_with_default_integration_keycloak(
346
346
  @pytest.mark.integration
347
347
  @pytest.mark.project_integration
348
348
  @pytest.mark.default_integration
349
- @pytest.mark.regression
349
+ @pytest.mark.api
350
350
  def test_assistant_with_default_integration_report_portal(
351
351
  general_integration,
352
352
  integration_utils,
@@ -22,7 +22,7 @@ from codemie_test_harness.tests.utils.base_utils import (
22
22
 
23
23
  @pytest.mark.integration
24
24
  @pytest.mark.project_integration
25
- @pytest.mark.regression
25
+ @pytest.mark.api
26
26
  @pytest.mark.parametrize(
27
27
  "credential_type, credentials",
28
28
  valid_integrations,
@@ -54,7 +54,7 @@ def test_integration_created(
54
54
 
55
55
  @pytest.mark.integration
56
56
  @pytest.mark.project_integration
57
- @pytest.mark.regression
57
+ @pytest.mark.api
58
58
  @pytest.mark.parametrize(
59
59
  "credential_type, credentials",
60
60
  testable_integrations,
@@ -91,8 +91,8 @@ def test_integration_after_creation(
91
91
 
92
92
  @pytest.mark.integration
93
93
  @pytest.mark.project_integration
94
- @pytest.mark.regression
95
- @pytest.mark.tescase("EPMCDME-2376")
94
+ @pytest.mark.api
95
+ @pytest.mark.testcase("EPMCDME-2376")
96
96
  @pytest.mark.parametrize(
97
97
  "credential_type, credentials",
98
98
  valid_integrations,
@@ -136,7 +136,7 @@ def test_update_integration(
136
136
 
137
137
  @pytest.mark.integration
138
138
  @pytest.mark.project_integration
139
- @pytest.mark.regression
139
+ @pytest.mark.api
140
140
  @pytest.mark.parametrize(
141
141
  "credential_type, credentials, error_message",
142
142
  invalid_integrations,
@@ -177,7 +177,7 @@ def test_integration_with_invalid_credentials(
177
177
 
178
178
  @pytest.mark.integration
179
179
  @pytest.mark.project_integration
180
- @pytest.mark.regression
180
+ @pytest.mark.api
181
181
  @pytest.mark.parametrize(
182
182
  "credential_type, credentials",
183
183
  testable_integrations,
@@ -201,7 +201,7 @@ def test_integration_during_creation(credential_type, credentials, integration_u
201
201
 
202
202
  @pytest.mark.integration
203
203
  @pytest.mark.project_integration
204
- @pytest.mark.regression
204
+ @pytest.mark.api
205
205
  @pytest.mark.parametrize(
206
206
  "credential_type, credentials, error_message",
207
207
  invalid_integrations,
@@ -223,8 +223,8 @@ def test_integration_during_creation_with_invalid_credentials(
223
223
 
224
224
  @pytest.mark.integration
225
225
  @pytest.mark.project_integration
226
- @pytest.mark.regression
227
- @pytest.mark.tescase("EPMCDME-2374")
226
+ @pytest.mark.api
227
+ @pytest.mark.testcase("EPMCDME-2374")
228
228
  @pytest.mark.parametrize(
229
229
  "credential_type, credentials",
230
230
  valid_integrations,