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

Offering help: Improving Unit Tests #143

Open
erlapso opened this issue Mar 3, 2025 · 0 comments
Open

Offering help: Improving Unit Tests #143

erlapso opened this issue Mar 3, 2025 · 0 comments

Comments

@erlapso
Copy link

erlapso commented Mar 3, 2025

Hi everyone! I noticed a lot of Pull Requests, particularly in relation to new features and tests.

I'd like to help improve the test coverage using CodeBeaver, an AI agent that I built (it's free for open source!). To demonstrate what's possible, I've created a PR:
CodeBeaverAI#1
that adds comprehensive tests to the last Pull Request that was opened here: Added function to stenography.py to embed prompt in to a code block.

What the PR demonstrates:

  • Increases coverage by significant margins across multiple files:
    • tests/test_app.py: New coverage of 100.00% (Improvement: +100.00%)
    • tests/test_http_spec.py: New coverage of 97.96% (Improvement: +97.96%)
    • agentic_security/test_lib.py: New coverage of 89.78% (Improvement: +27.01%)
  • No existing tests required updates, and no bugs were detected in the recent changes.

On top of that: If you check the PR, you'll see that CodeBeaver does not only focus on coverage—it also adds all the edge cases it can think of (we make it iterate 3 times on that alone).

How it works:

CodeBeaver analyzes your code changes in PRs

  • Automatically generates and updates tests
  • Opens PRs with new/updated tests
  • Helps catch bugs before they reach production (none found in this case!)

Next steps

If this interests the maintainer team, I'm happy to:

  • Walk through how the tests were generated
  • Help set up automated test generation for future PRs (takes ~5 minutes)

Again, it's free for open source.

Let me know what you think! Happy to adapt this approach based on the project's needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant