mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 07:13:00 +00:00
Add test scripts for manual verification
Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
44
test_verbose_fix.py
Normal file
44
test_verbose_fix.py
Normal 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()
|
||||
Reference in New Issue
Block a user