MCPcopy
hub / github.com/qodo-ai/qodo-cover / run

Method run

cover_agent/CoverAgent.py:371–394  ·  view source on GitHub ↗

Execute the main test generation loop until coverage goals are met or iterations exhausted. The process involves: 1. Initializing the environment 2. Repeatedly generating and validating tests 3. Checking progress after each iteration 4. Final

(self)

Source from the content-addressed store, hash-verified

369 self.logger.info(f"Desired Coverage: {self.test_validator.desired_coverage}%")
370
371 def run(self):
372 """
373 Execute the main test generation loop until coverage goals are met or iterations exhausted.
374
375 The process involves:
376 1. Initializing the environment
377 2. Repeatedly generating and validating tests
378 3. Checking progress after each iteration
379 4. Finalizing and reporting results
380 """
381 iteration_count = 0
382 failed_test_runs, language, test_framework, coverage_report = self.init()
383
384 while iteration_count < self.config.max_iterations:
385 self.logger.info(f"Iteration {iteration_count + 1} of {self.config.max_iterations}.")
386 self.generate_and_validate_tests(failed_test_runs, language, test_framework, coverage_report)
387
388 failed_test_runs, language, test_framework, coverage_report, target_reached = self.check_iteration_progress()
389 if target_reached:
390 break
391
392 iteration_count += 1
393
394 self.finalize_test_generation(iteration_count)

Callers 11

runFunction · 0.95
mainFunction · 0.95
run_docker_containerFunction · 0.80
mainFunction · 0.80
run_commandMethod · 0.80
get_dotnet_versionMethod · 0.80
main.pyFile · 0.80
mainMethod · 0.80

Calls 4

initMethod · 0.95

Tested by 3

mainMethod · 0.64