Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No tests written with PHP (laravel) project (Request: Support for PHP) #162

Open
mgaber2024 opened this issue Sep 23, 2024 · 1 comment
Open
Assignees
Labels
language support Support for a new language

Comments

@mgaber2024
Copy link

The tests are shown in the console output when running the Codium coverage agent with the following command, but no tests are written to the specified file.
it repeats the same outputs over and over until I got this " Reached maximum iteration limit without achieving desired coverage. Current Coverage: 0.0%
"
I got the same result even when I lower the desired-coverage value

Command used:

export GROQ_API_KEY="api-key" ./cover-agent-ubuntu \ --source-file-path "./app/Http/Controllers/LogoutController.php" \ --test-file-path "./tests/Feature/LogoutTest.php" \ --code-coverage-report-path "./coverage.xml" \ --test-command "./vendor/bin/pest --coverage --coverage-clover=coverage.xml" \ --test-command-dir "." \ --coverage-type "cobertura" \ --desired-coverage 20 \ --max-iterations 3 \ --model "groq/llama3-8b-8192" \ --api-base "https://api.groq.com/openai/v1/chat/completions"

Expected Behavior: The tests should be written to the specified test file (LogoutTest.php) as indicated in the command.

Actual Behavior: The tests appear to run successfully, and coverage is reported in the console output, but no changes are made to the test file (LogoutTest.php). It remains unchanged after execution.

Steps to Reproduce:

Run the above command with a valid API key and file paths.
Observe the test output in the console.
Check the test file (LogoutTest.php), which should have been modified or written with tests but is not.

Environment:

OS: Ubuntu
Test framework: Pest
Model: groq/llama3-8b-8192
API base: https://api.groq.com/openai/v1/chat/completions
Coverage type: Cobertura

Additional Information:

I am using Pest for testing in a Laravel project.
The console shows successful test output, but no tests are written to the file as expected.
Please look into this issue. Let me know if you need additional information or logs.

Thank you!

@EmbeddedDevops1
Copy link
Collaborator

@mgaber2024 Thanks for filing the issue. PHP is a great template to add to the arsenal. We'll get on that ASAP.

In the meantime, lower performing LLMs like llama3-8b won't cut it. You'll need to try something higher end such at gpt-4o. Have you tried gpt-4o yet with Cover Agent?

@EmbeddedDevops1 EmbeddedDevops1 self-assigned this Sep 26, 2024
@EmbeddedDevops1 EmbeddedDevops1 added the language support Support for a new language label Oct 6, 2024
@EmbeddedDevops1 EmbeddedDevops1 changed the title No tests written with PHP (laravel) project No tests written with PHP (laravel) project (Request: Support for PHP) Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language support Support for a new language
Projects
Status: No status
Development

No branches or pull requests

3 participants
@mgaber2024 @EmbeddedDevops1 and others