Add test scripts for manual verification

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2025-08-13 13:00:25 +00:00
parent ac69573afa
commit 2c98d0c1d9
2 changed files with 101 additions and 0 deletions

44
test_verbose_fix.py Normal file
View File

@@ -0,0 +1,44 @@
#!/usr/bin/env python3
"""Test script to verify verbose output shows task names instead of IDs."""
from crewai import Agent, Task, Crew
def test_verbose_output():
"""Test that verbose output shows task names instead of UUIDs."""
print("Testing verbose output with task names...")
agent = Agent(
role="Research Analyst",
goal="Analyze data and provide insights",
backstory="You are an experienced data analyst.",
verbose=True
)
task = Task(
name="Market Research Analysis",
description="Research current market trends in AI technology",
expected_output="A comprehensive report on AI market trends",
agent=agent
)
crew = Crew(
agents=[agent],
tasks=[task],
verbose=True
)
print("Task name:", task.name)
print("Task ID:", task.id)
print("\nRunning crew with verbose=True...")
print("Expected: Should show task name 'Market Research Analysis' instead of UUID")
try:
result = crew.kickoff()
print("\nCrew execution completed successfully!")
return True
except Exception as e:
print(f"Error during execution: {e}")
return False
if __name__ == "__main__":
test_verbose_output()