Codium-ai / cover-agent

QodoAI Cover-Agent: An AI-Powered Tool for Automated Test Generation and Code Coverage Enhancement! 💻🤖🧪🐞
https://qodo.ai/
GNU Affero General Public License v3.0
4.37k stars 327 forks source link

Inquiry about the Meaning of Parameters Passed to cover-agent #210

Closed redvelvets closed 3 days ago

redvelvets commented 1 week ago

Hello, I would like to inquire about the parsing of parameters passed when calling cover-agent.

cover-agent \
  --source-file-path="src/main/java/com/davidparry/cover/SimpleMathOperations.java" \
  --test-file-path="src/test/groovy/com/davidparry/cover/SimpleMathOperationsSpec.groovy" \
  --code-coverage-report-path="build/reports/jacoco/test/jacocoTestReport.csv" \
  --test-command="./gradlew clean test jacocoTestReport" \
  --test-command-dir=$(pwd) \
  --coverage-type="jacoco" \
  --desired-coverage=70 \
  --max-iterations=1
  1. Does the --code-coverage-report-path parameter refer to the coverage report of a single file (e.g., as specified in --test-file-path), or does it refer to the coverage report at the module/project level?

    • If it's the module/project level report, the coverage increase for a single test might be very small. If it's the report for a single file, does the --test-command generate the coverage report only for that specific file?
  2. From my understanding, the command ./gradlew clean test jacocoTestReport generates the coverage report at the module or project level. Is my understanding correct?