cloudflare / cloudflare/cloudflared

💡Offering help with Unit Tests

Open
#1,433 0 comments 0 reactions 0 assignees View on GitHub
Priority: Normal Type: Feature Request
Dominant language
Go
Stars
15.6k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

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](https://www.codebeaver.ai), an AI agent that I built (it's free for open source!). To demonstrate what's possible, I've created a PR:
[feat(Makefile): add support for arch mips - Unit Tests](https://github.com/CodeBeaverDemo/cloudflared/pull/1)
that adds comprehensive tests to the last Pull Request that was opened here: [feat(Makefile): add support for arch mips](https://github.com/cloudflare/cloudflared/pull/1418)

## What the PR demonstrates:

* Increases coverage by 60.00% for `connection/connection_test.go`
* Adds 1 comprehensive test in `connection/connection_test.go` that passes successfully
* No bugs were detected in the changes, indicating a solid implementation

On top of that: If you check the PR you will see that CodeBeaver does not only go for 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

## 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)
* Focus on specific areas you'd like to improve coverage for

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

Links:
* [CodeBeaver website](https://www.codebeaver.ai)
* [Open source repo](https://github.com/codebeaver-ai/codebeaver-ai)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.