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

Add support for Kotlin #192

Open smwhit opened 1 month ago

smwhit commented 1 month ago

I've tried cover-agent against kotlin code and it doesn't seem to work. Can support be added?

I get: cover_agent.CoverAgent - INFO - Current Coverage: 0% then later

cover_agent.UnitTestGenerator - INFO - Running test with the following command: "./gradlew clean test jacocoTestReport"
cover_agent.UnitTestGenerator - INFO - Test did not increase coverage. Rolling back.`

I also have java code in this project and it works fine if I point cover-agent at the java files.

EmbeddedDevops1 commented 3 weeks ago

Hi @smwhit. Thanks for filing the issue. Any chance you can point us to an open source repo that we can use to test this out?

smwhit commented 3 weeks ago

Hi @EmbeddedDevops1 - this should do it https://github.com/smwhit/cover-agent-kotlin-testing. Command line I am using for java and kotlin are in the readme.

redvelvets commented 1 week ago

image image 你可能需要针对.kt单独做一个判断,因为kotlin的package没有;,className没有public

redvelvets commented 5 days ago

kotlin is supported