File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -250,11 +250,13 @@ pytest tests/integration/
250250Here is an example of a ` pytest ` test case that runs a single test file:
251251
252252``` py
253+ from google.adk.evaluation.agent_evaluator import AgentEvaluator
254+
253255def test_with_single_test_file ():
254256 """ Test the agent's basic ability via a session file."""
255257 AgentEvaluator.evaluate(
256- agent_module = " tests.integration.fixture. home_automation_agent" ,
257- eval_dataset = " tests/integration/fixture/home_automation_agent/simple_test.test.json" ,
258+ agent_module = " home_automation_agent" ,
259+ eval_dataset_file_path_or_dir = " tests/integration/fixture/home_automation_agent/simple_test.test.json" ,
258260 )
259261```
260262
@@ -283,11 +285,13 @@ Here is a sample session json file:
283285And the sample code will look like this:
284286
285287``` py
288+ from google.adk.evaluation.agent_evaluator import AgentEvaluator
289+
286290def test_with_single_test_file ():
287291 """ Test the agent's basic ability via a session file."""
288292 AgentEvaluator.evaluate(
289- agent_module = " tests.integration.fixture. trip_planner_agent" ,
290- eval_dataset = " tests/integration/fixture/trip_planner_agent/simple_test.test.json" ,
293+ agent_module = " trip_planner_agent" ,
294+ eval_dataset_file_path_or_dir = " tests/integration/fixture/trip_planner_agent/simple_test.test.json" ,
291295 initial_session_file = " tests/integration/fixture/trip_planner_agent/initial.session.json"
292296 )
293297```
You can’t perform that action at this time.
0 commit comments