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
@@ -9,13 +9,18 @@ from codemie_test_harness.tests.test_data.google_datasource_test_data import (
9
9
  RESPONSE_FOR_GOOGLE_DOC,
10
10
  USER_PROMPT,
11
11
  )
12
- from codemie_test_harness.tests.utils.base_utils import get_random_name, assert_response
12
+ from codemie_test_harness.tests.utils.base_utils import (
13
+ get_random_name,
14
+ assert_response,
15
+ assert_tool_triggered,
16
+ )
17
+ from codemie_test_harness.tests.enums.tools import Default
13
18
 
14
19
 
15
20
  @pytest.mark.datasource
16
21
  @pytest.mark.google
17
22
  @pytest.mark.smoke
18
- @pytest.mark.regression
23
+ @pytest.mark.api
19
24
  def test_create_datasource_with_google_integration(
20
25
  datasource_utils,
21
26
  assistant,
@@ -24,22 +29,31 @@ def test_create_datasource_with_google_integration(
24
29
  kb_context,
25
30
  google_doc_datasource,
26
31
  ):
27
- assistant = assistant(context=kb_context(google_doc_datasource))
32
+ assistant = assistant(
33
+ context=kb_context(google_doc_datasource),
34
+ system_prompt="Run tools on each user prompt",
35
+ )
28
36
 
29
- response_from_llm = assistant_utils.ask_assistant(assistant, USER_PROMPT)
37
+ response_from_llm, triggered_tools = assistant_utils.ask_assistant(
38
+ assistant, USER_PROMPT, minimal_response=False
39
+ )
40
+ assert_tool_triggered(Default.SEARCH_KB, triggered_tools)
30
41
  similarity_check.check_similarity(response_from_llm, RESPONSE_FOR_GOOGLE_DOC)
31
42
 
32
43
  datasource_utils.update_google_doc_datasource(
33
44
  google_doc_datasource.id, full_reindex=True, skip_reindex=False
34
45
  )
35
46
 
36
- response_from_llm = assistant_utils.ask_assistant(assistant, USER_PROMPT)
47
+ response_from_llm, triggered_tools = assistant_utils.ask_assistant(
48
+ assistant, USER_PROMPT, minimal_response=False
49
+ )
50
+ assert_tool_triggered(Default.SEARCH_KB, triggered_tools)
37
51
  similarity_check.check_similarity(response_from_llm, RESPONSE_FOR_GOOGLE_DOC)
38
52
 
39
53
 
40
54
  @pytest.mark.datasource
41
55
  @pytest.mark.google
42
- @pytest.mark.regression
56
+ @pytest.mark.api
43
57
  @pytest.mark.smoke
44
58
  def test_edit_description_for_google_data_source(
45
59
  client, datasource_utils, google_doc_datasource
@@ -56,7 +70,7 @@ def test_edit_description_for_google_data_source(
56
70
 
57
71
  @pytest.mark.datasource
58
72
  @pytest.mark.google
59
- @pytest.mark.regression
73
+ @pytest.mark.api
60
74
  @pytest.mark.smoke
61
75
  def test_create_google_doc_datasource_with_existing_name(
62
76
  google_doc_datasource, datasource_utils
@@ -12,7 +12,12 @@ from codemie_test_harness.tests.test_data.pm_tools_test_data import (
12
12
  RESPONSE_FOR_JIRA_CLOUD_TOOL,
13
13
  )
14
14
  from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
15
- from codemie_test_harness.tests.utils.base_utils import get_random_name, assert_response
15
+ from codemie_test_harness.tests.utils.base_utils import (
16
+ get_random_name,
17
+ assert_response,
18
+ assert_tool_triggered,
19
+ )
20
+ from codemie_test_harness.tests.enums.tools import Default
16
21
 
17
22
 
18
23
  @pytest.fixture(scope="function")
@@ -27,7 +32,7 @@ def jira_cloud_datasource(datasource_utils, jira_cloud_integration):
27
32
 
28
33
  @pytest.mark.datasource
29
34
  @pytest.mark.project_management
30
- @pytest.mark.regression
35
+ @pytest.mark.api
31
36
  @pytest.mark.parametrize(
32
37
  "datasource_fixture, prompt, expected_response",
33
38
  [
@@ -59,22 +64,30 @@ def test_create_datasource_with_jira_and_jira_cloud_integration(
59
64
  expected_response,
60
65
  ):
61
66
  datasource = request.getfixturevalue(datasource_fixture)
62
- assistant = assistant(context=kb_context(datasource))
67
+ assistant = assistant(
68
+ context=kb_context(datasource), system_prompt="Run tools on each user prompt"
69
+ )
63
70
 
64
- response = assistant_utils.ask_assistant(assistant, prompt)
65
- similarity_check.check_similarity(response, response)
71
+ response, triggered_tools = assistant_utils.ask_assistant(
72
+ assistant, prompt, minimal_response=False
73
+ )
74
+ assert_tool_triggered(Default.SEARCH_KB, triggered_tools)
75
+ similarity_check.check_similarity(response, expected_response)
66
76
 
67
77
  datasource_utils.update_jira_datasource(
68
78
  datasource.id, full_reindex=True, skip_reindex=False
69
79
  )
70
80
 
71
- response = assistant_utils.ask_assistant(assistant, prompt)
72
- similarity_check.check_similarity(response, response)
81
+ response, triggered_tools = assistant_utils.ask_assistant(
82
+ assistant, prompt, minimal_response=False
83
+ )
84
+ assert_tool_triggered(Default.SEARCH_KB, triggered_tools)
85
+ similarity_check.check_similarity(response, expected_response)
73
86
 
74
87
 
75
88
  @pytest.mark.datasource
76
89
  @pytest.mark.jira
77
- @pytest.mark.regression
90
+ @pytest.mark.api
78
91
  def test_edit_description_for_jira_data_source(
79
92
  client, datasource_utils, jira_datasource
80
93
  ):
@@ -90,7 +103,7 @@ def test_edit_description_for_jira_data_source(
90
103
 
91
104
  @pytest.mark.datasource
92
105
  @pytest.mark.jira
93
- @pytest.mark.regression
106
+ @pytest.mark.api
94
107
  def test_create_jira_datasource_with_existing_name(datasource_utils, jira_datasource):
95
108
  datasource = datasource_utils.get_datasource(jira_datasource.id)
96
109
 
@@ -13,13 +13,14 @@ from codemie_test_harness.tests.test_data.pm_tools_test_data import (
13
13
  )
14
14
  from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
15
15
  from codemie_test_harness.tests.utils.constants import test_project_name
16
+ from codemie_test_harness.tests.utils.base_utils import assert_tool_triggered
16
17
 
17
18
 
18
19
  @pytest.mark.integration
19
20
  @pytest.mark.default_integration
20
21
  @pytest.mark.not_for_parallel_run
21
- @pytest.mark.regression
22
- @pytest.mark.tescase("EPMCDME-6708")
22
+ @pytest.mark.api
23
+ @pytest.mark.testcase("EPMCDME-6708")
23
24
  @pytest.mark.parametrize(
24
25
  "user_integration, is_global, project_integration",
25
26
  integrations,
@@ -71,16 +72,19 @@ def test_assistant_should_use_user_integration_by_default(
71
72
  project_name=test_project_name,
72
73
  )
73
74
 
74
- response = assistant_utils.ask_assistant(jira_assistant, JIRA_TOOL_PROMPT)
75
+ response, triggered_tools = assistant_utils.ask_assistant(
76
+ jira_assistant, JIRA_TOOL_PROMPT, minimal_response=False
77
+ )
75
78
 
79
+ assert_tool_triggered(ProjectManagementTool.JIRA, triggered_tools)
76
80
  similarity_check.check_similarity(response, RESPONSE_FOR_JIRA_TOOL)
77
81
 
78
82
 
79
83
  @pytest.mark.integration
80
84
  @pytest.mark.default_integration
81
85
  @pytest.mark.not_for_parallel_run
82
- @pytest.mark.regression
83
- @pytest.mark.tescase("EPMCDME-6708")
86
+ @pytest.mark.api
87
+ @pytest.mark.testcase("EPMCDME-6708")
84
88
  def test_assistant_with_global_and_project_integration(
85
89
  integration_utils,
86
90
  assistant,
@@ -115,16 +119,19 @@ def test_assistant_with_global_and_project_integration(
115
119
  project_name=test_project_name,
116
120
  )
117
121
 
118
- response = assistant_utils.ask_assistant(jira_assistant, JIRA_TOOL_PROMPT)
122
+ response, triggered_tools = assistant_utils.ask_assistant(
123
+ jira_assistant, JIRA_TOOL_PROMPT, minimal_response=False
124
+ )
119
125
 
126
+ assert_tool_triggered(ProjectManagementTool.JIRA, triggered_tools)
120
127
  similarity_check.check_similarity(response, RESPONSE_FOR_JIRA_TOOL)
121
128
 
122
129
 
123
130
  @pytest.mark.integration
124
131
  @pytest.mark.default_integration
125
132
  @pytest.mark.not_for_parallel_run
126
- @pytest.mark.regression
127
- @pytest.mark.tescase("EPMCDME-6708")
133
+ @pytest.mark.api
134
+ @pytest.mark.testcase("EPMCDME-6708")
128
135
  def test_assistant_with_project_integration_only(
129
136
  integration_utils,
130
137
  assistant,
@@ -150,15 +157,18 @@ def test_assistant_with_project_integration_only(
150
157
  project_name=test_project_name,
151
158
  )
152
159
 
153
- response = assistant_utils.ask_assistant(jira_assistant, JIRA_TOOL_PROMPT)
160
+ response, triggered_tools = assistant_utils.ask_assistant(
161
+ jira_assistant, JIRA_TOOL_PROMPT, minimal_response=False
162
+ )
154
163
 
164
+ assert_tool_triggered(ProjectManagementTool.JIRA, triggered_tools)
155
165
  similarity_check.check_similarity(response, RESPONSE_FOR_JIRA_TOOL)
156
166
 
157
167
 
158
168
  @pytest.mark.integration
159
169
  @pytest.mark.default_integration
160
170
  @pytest.mark.not_for_parallel_run
161
- @pytest.mark.regression
171
+ @pytest.mark.api
162
172
  def test_assistant_with_global_valid_and_user_invalid_integration(
163
173
  assistant, assistant_utils, integration_utils, similarity_check
164
174
  ):
@@ -190,15 +200,18 @@ def test_assistant_with_global_valid_and_user_invalid_integration(
190
200
  project_name=test_project_name,
191
201
  )
192
202
 
193
- response = assistant_utils.ask_assistant(jira_assistant, JIRA_TOOL_PROMPT)
203
+ response, triggered_tools = assistant_utils.ask_assistant(
204
+ jira_assistant, JIRA_TOOL_PROMPT, minimal_response=False
205
+ )
194
206
 
207
+ assert_tool_triggered(ProjectManagementTool.JIRA, triggered_tools)
195
208
  similarity_check.check_similarity(response, RESPONSE_FOR_JIRA_TOOL)
196
209
 
197
210
 
198
211
  @pytest.mark.integration
199
212
  @pytest.mark.default_integration
200
213
  @pytest.mark.not_for_parallel_run
201
- @pytest.mark.regression
214
+ @pytest.mark.api
202
215
  def test_assistant_with_project_valid_and_user_invalid_integration(
203
216
  assistant, assistant_utils, integration_utils, similarity_check
204
217
  ):
@@ -230,6 +243,9 @@ def test_assistant_with_project_valid_and_user_invalid_integration(
230
243
  project_name=test_project_name,
231
244
  )
232
245
 
233
- response = assistant_utils.ask_assistant(jira_assistant, JIRA_TOOL_PROMPT)
246
+ response, triggered_tools = assistant_utils.ask_assistant(
247
+ jira_assistant, JIRA_TOOL_PROMPT, minimal_response=False
248
+ )
234
249
 
250
+ assert_tool_triggered(ProjectManagementTool.JIRA, triggered_tools)
235
251
  similarity_check.check_similarity(response, RESPONSE_FOR_JIRA_TOOL)
@@ -12,6 +12,7 @@ from codemie_test_harness.tests.test_data.ado_wiki_tools_test_data import (
12
12
  )
13
13
  from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
14
14
  from codemie_test_harness.tests.utils.constants import test_project_name
15
+ from codemie_test_harness.tests.utils.base_utils import assert_tool_triggered
15
16
 
16
17
  ado_wiki_prompt = ado_wiki_get_test_data[1][2]
17
18
  ado_wiki_answer = ado_wiki_get_test_data[1][3]
@@ -20,8 +21,8 @@ ado_wiki_answer = ado_wiki_get_test_data[1][3]
20
21
  @pytest.mark.integration
21
22
  @pytest.mark.default_integration
22
23
  @pytest.mark.not_for_parallel_run
23
- @pytest.mark.regression
24
- @pytest.mark.tescase("EPMCDME-6708")
24
+ @pytest.mark.api
25
+ @pytest.mark.testcase("EPMCDME-6708")
25
26
  @pytest.mark.parametrize(
26
27
  "user_integration, is_global, project_integration",
27
28
  integrations,
@@ -75,16 +76,19 @@ def test_assistant_should_use_user_integration_by_default(
75
76
  project_name=test_project_name,
76
77
  )
77
78
 
78
- response = assistant_utils.ask_assistant(ado_assistant, ado_wiki_prompt)
79
+ response, triggered_tools = assistant_utils.ask_assistant(
80
+ ado_assistant, ado_wiki_prompt, minimal_response=False
81
+ )
79
82
 
83
+ assert_tool_triggered(AzureDevOpsWikiTool.GET_WIKI, triggered_tools)
80
84
  similarity_check.check_similarity(response, ado_wiki_answer)
81
85
 
82
86
 
83
87
  @pytest.mark.integration
84
88
  @pytest.mark.default_integration
85
- @pytest.mark.regression
89
+ @pytest.mark.api
86
90
  @pytest.mark.not_for_parallel_run
87
- @pytest.mark.tescase("EPMCDME-6708")
91
+ @pytest.mark.testcase("EPMCDME-6708")
88
92
  def test_assistant_with_global_and_project_integration(
89
93
  integration_utils,
90
94
  assistant,
@@ -120,16 +124,19 @@ def test_assistant_with_global_and_project_integration(
120
124
  project_name=test_project_name,
121
125
  )
122
126
 
123
- response = assistant_utils.ask_assistant(ado_assistant, ado_wiki_prompt)
127
+ response, triggered_tools = assistant_utils.ask_assistant(
128
+ ado_assistant, ado_wiki_prompt, minimal_response=False
129
+ )
124
130
 
131
+ assert_tool_triggered(AzureDevOpsWikiTool.GET_WIKI, triggered_tools)
125
132
  similarity_check.check_similarity(response, ado_wiki_answer)
126
133
 
127
134
 
128
135
  @pytest.mark.integration
129
136
  @pytest.mark.default_integration
130
137
  @pytest.mark.not_for_parallel_run
131
- @pytest.mark.regression
132
- @pytest.mark.tescase("EPMCDME-6708")
138
+ @pytest.mark.api
139
+ @pytest.mark.testcase("EPMCDME-6708")
133
140
  def test_assistant_with_project_integration_only(
134
141
  integration_utils,
135
142
  assistant,
@@ -157,15 +164,18 @@ def test_assistant_with_project_integration_only(
157
164
  project_name=test_project_name,
158
165
  )
159
166
 
160
- response = assistant_utils.ask_assistant(ado_assistant, ado_wiki_prompt)
167
+ response, triggered_tools = assistant_utils.ask_assistant(
168
+ ado_assistant, ado_wiki_prompt, minimal_response=False
169
+ )
161
170
 
171
+ assert_tool_triggered(AzureDevOpsWikiTool.GET_WIKI, triggered_tools)
162
172
  similarity_check.check_similarity(response, ado_wiki_answer)
163
173
 
164
174
 
165
175
  @pytest.mark.integration
166
176
  @pytest.mark.default_integration
167
177
  @pytest.mark.not_for_parallel_run
168
- @pytest.mark.regression
178
+ @pytest.mark.api
169
179
  def test_assistant_with_global_valid_and_user_invalid_integration(
170
180
  assistant, assistant_utils, integration_utils, similarity_check
171
181
  ):
@@ -199,15 +209,18 @@ def test_assistant_with_global_valid_and_user_invalid_integration(
199
209
  project_name=test_project_name,
200
210
  )
201
211
 
202
- response = assistant_utils.ask_assistant(ado_assistant, ado_wiki_prompt)
212
+ response, triggered_tools = assistant_utils.ask_assistant(
213
+ ado_assistant, ado_wiki_prompt, minimal_response=False
214
+ )
203
215
 
216
+ assert_tool_triggered(AzureDevOpsWikiTool.GET_WIKI, triggered_tools)
204
217
  similarity_check.check_similarity(response, ado_wiki_answer)
205
218
 
206
219
 
207
220
  @pytest.mark.integration
208
221
  @pytest.mark.default_integration
209
222
  @pytest.mark.not_for_parallel_run
210
- @pytest.mark.regression
223
+ @pytest.mark.api
211
224
  def test_assistant_with_project_valid_and_user_invalid_integration(
212
225
  assistant, assistant_utils, integration_utils, similarity_check
213
226
  ):
@@ -241,6 +254,9 @@ def test_assistant_with_project_valid_and_user_invalid_integration(
241
254
  project_name=test_project_name,
242
255
  )
243
256
 
244
- response = assistant_utils.ask_assistant(ado_assistant, ado_wiki_prompt)
257
+ response, triggered_tools = assistant_utils.ask_assistant(
258
+ ado_assistant, ado_wiki_prompt, minimal_response=False
259
+ )
245
260
 
261
+ assert_tool_triggered(AzureDevOpsWikiTool.GET_WIKI, triggered_tools)
246
262
  similarity_check.check_similarity(response, ado_wiki_answer)
@@ -12,6 +12,7 @@ from codemie_test_harness.tests.test_data.git_tools_test_data import (
12
12
  )
13
13
  from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
14
14
  from codemie_test_harness.tests.utils.constants import test_project_name
15
+ from codemie_test_harness.tests.utils.base_utils import assert_tool_triggered
15
16
 
16
17
 
17
18
  git_tool_prompt = list_branches_set_active_branch_test_data[0][2]
@@ -21,8 +22,8 @@ git_tool_answer = list_branches_set_active_branch_test_data[0][3]
21
22
  @pytest.mark.integration
22
23
  @pytest.mark.default_integration
23
24
  @pytest.mark.not_for_parallel_run
24
- @pytest.mark.regression
25
- @pytest.mark.tescase("EPMCDME-6708")
25
+ @pytest.mark.api
26
+ @pytest.mark.testcase("EPMCDME-6708")
26
27
  @pytest.mark.parametrize(
27
28
  "user_integration, is_global, project_integration",
28
29
  integrations,
@@ -86,16 +87,19 @@ def test_assistant_should_use_user_integration_by_default(
86
87
  project_name=test_project_name,
87
88
  )
88
89
 
89
- response = assistant_utils.ask_assistant(git_assistant, git_tool_prompt)
90
+ response, triggered_tools = assistant_utils.ask_assistant(
91
+ git_assistant, git_tool_prompt, minimal_response=False
92
+ )
90
93
 
94
+ assert_tool_triggered(GitTool.LIST_BRANCHES_IN_REPO, triggered_tools)
91
95
  similarity_check.check_similarity(response, git_tool_answer)
92
96
 
93
97
 
94
98
  @pytest.mark.integration
95
99
  @pytest.mark.default_integration
96
100
  @pytest.mark.not_for_parallel_run
97
- @pytest.mark.regression
98
- @pytest.mark.tescase("EPMCDME-6708")
101
+ @pytest.mark.api
102
+ @pytest.mark.testcase("EPMCDME-6708")
99
103
  def test_assistant_with_global_and_project_integration(
100
104
  datasource_utils,
101
105
  default_embedding_llm,
@@ -145,16 +149,19 @@ def test_assistant_with_global_and_project_integration(
145
149
  project_name=test_project_name,
146
150
  )
147
151
 
148
- response = assistant_utils.ask_assistant(git_assistant, git_tool_prompt)
152
+ response, triggered_tools = assistant_utils.ask_assistant(
153
+ git_assistant, git_tool_prompt, minimal_response=False
154
+ )
149
155
 
156
+ assert_tool_triggered(GitTool.LIST_BRANCHES_IN_REPO, triggered_tools)
150
157
  similarity_check.check_similarity(response, git_tool_answer)
151
158
 
152
159
 
153
160
  @pytest.mark.integration
154
161
  @pytest.mark.default_integration
155
162
  @pytest.mark.not_for_parallel_run
156
- @pytest.mark.regression
157
- @pytest.mark.tescase("EPMCDME-6708")
163
+ @pytest.mark.api
164
+ @pytest.mark.testcase("EPMCDME-6708")
158
165
  def test_assistant_with_project_integration_only(
159
166
  datasource_utils,
160
167
  default_embedding_llm,
@@ -191,15 +198,18 @@ def test_assistant_with_project_integration_only(
191
198
  project_name=test_project_name,
192
199
  )
193
200
 
194
- response = assistant_utils.ask_assistant(git_assistant, git_tool_prompt)
201
+ response, triggered_tools = assistant_utils.ask_assistant(
202
+ git_assistant, git_tool_prompt, minimal_response=False
203
+ )
195
204
 
205
+ assert_tool_triggered(GitTool.LIST_BRANCHES_IN_REPO, triggered_tools)
196
206
  similarity_check.check_similarity(response, git_tool_answer)
197
207
 
198
208
 
199
209
  @pytest.mark.integration
200
210
  @pytest.mark.default_integration
201
211
  @pytest.mark.not_for_parallel_run
202
- @pytest.mark.regression
212
+ @pytest.mark.api
203
213
  def test_assistant_with_global_valid_and_user_invalid_integration(
204
214
  assistant,
205
215
  assistant_utils,
@@ -249,15 +259,18 @@ def test_assistant_with_global_valid_and_user_invalid_integration(
249
259
  project_name=test_project_name,
250
260
  )
251
261
 
252
- response = assistant_utils.ask_assistant(git_assistant, git_tool_prompt)
262
+ response, triggered_tools = assistant_utils.ask_assistant(
263
+ git_assistant, git_tool_prompt, minimal_response=False
264
+ )
253
265
 
266
+ assert_tool_triggered(GitTool.LIST_BRANCHES_IN_REPO, triggered_tools)
254
267
  similarity_check.check_similarity(response, git_tool_answer)
255
268
 
256
269
 
257
270
  @pytest.mark.integration
258
271
  @pytest.mark.default_integration
259
272
  @pytest.mark.not_for_parallel_run
260
- @pytest.mark.regression
273
+ @pytest.mark.api
261
274
  def test_assistant_with_project_valid_and_user_invalid_integration(
262
275
  assistant,
263
276
  assistant_utils,
@@ -307,6 +320,9 @@ def test_assistant_with_project_valid_and_user_invalid_integration(
307
320
  project_name=test_project_name,
308
321
  )
309
322
 
310
- response = assistant_utils.ask_assistant(git_assistant, git_tool_prompt)
323
+ response, triggered_tools = assistant_utils.ask_assistant(
324
+ git_assistant, git_tool_prompt, minimal_response=False
325
+ )
311
326
 
327
+ assert_tool_triggered(GitTool.LIST_BRANCHES_IN_REPO, triggered_tools)
312
328
  similarity_check.check_similarity(response, git_tool_answer)