I’m trying to start testing the crew, but I get this problem:
(CrewAI_resume) ➜ CrewAI_resume crewai test --n_iterations=5 --model=gpt-4o
Testing the crew for 5 iterations with model gpt-4o
test: 5: unexpected operator
An error occurred while testing the crew: Command ‘[‘uv’, ‘run’, ‘test’, ‘5’, ‘gpt-4o’]’ returned non-zero exit status 2.
It’s a bug with the CrewAI project template. Go to your main.py and in the test method replace openai_model_name=sys.argv[2] with eval_llm=sys.argv[2] and testing should work.
It might be worthwhile to create an issue and a PR on Github with the fix if you can
In general, in order to implement the testing of my crew, I had to:
in one of the tasks, change async_execution: true to false
in one of the agents, comment # verbose: true
in one of the tasks, change expected_output
to crew.py comment on tools in one of the agents:
@agent
def researcher(self) → Agent:
return Agent(
config=self.agents_config[“researcher”],
verbose=True,
# tools=[search_tool, scrap_web_tool, clean_text_tool],
llm=self.llm
)
And something else!
In general, if you have a complex agent with several tools and custom tools, then you will not be able to run the code out of the box!
I also haven’t figured out how to use another LLM for testing!