-
Notifications
You must be signed in to change notification settings - Fork 0
[MODEL-20935] Add paramaterization for mcp tests #297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| @@ -1,3 +1,3 @@ | |||
| """ | |||
| Tests for MCP CrewAI integration - verifying agents have MCP tools configured. | |||
| """ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change this header to:
# Copyright 2025 DataRobot, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this merges into recipes we hit copyright errors. We should probably add a test for this to the repo, but its not quite as simple with the jinja
This repository is public. Do not put here any private DataRobot or customer's data: code, datasets, model artifacts, .etc.
Summary
Parameterize MCP Integration Tests
Summary
This PR simplifies and parameterizes MCP (Model Context Protocol) integration tests across all agent frameworks (CrewAI, LangGraph, LlamaIndex).
Changes
1. MCP Test Parameterization
Consolidated duplicate MCP integration tests across all three frameworks by using
pytest.mark.parametrize:Before
test_agent_loads_mcp_tools_from_external_url_in_invoketest_agent_loads_mcp_tools_from_datarobot_deployment_in_invokeAfter
test_agent_loads_mcp_tools_in_invokewith two test cases (external URL and DataRobot deployment)Files Modified
template/{{agent_app_name}}/tests/test_mcp_templates/test_mcp_crewai.j2template/{{agent_app_name}}/tests/test_mcp_templates/test_mcp_langgraph.j2template/{{agent_app_name}}/tests/test_mcp_templates/test_mcp_llamaindex.j23. Test Simplification
agent_kwargsparameterization: Tests now hardcodeapi_keyandapi_basedirectly within the test functiontools_factorycomplexity: All test cases now usedefault_toolsfrom the common mocks fixtureenv_patchdictionary inpytest.paramdefinitionsexpected_adapter_urlwhen provided (external URL case)Benefits
pytest.paramentryTesting
Rationale