Offering help with Unit Tests #6536

Closed
opened 2025-03-12 17:13:39 +01:00 by erlapso · 2 comments
erlapso commented 2025-03-12 17:13:39 +01:00 (Migrated from github.com)

What component of Red (cog, command, API) would you like to see improvements on?

Development process

Describe the enhancement you're suggesting.

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:

Add --cog-path CLI argument - Unit Tests

that adds comprehensive tests to the last Pull Request that was opened here: Add --cog-path CLI argument

What the PR demonstrates:

  • Increases coverage by 96.00% for tests/test__cli.py
  • Adds 1 comprehensive test file: tests/test__cli.py
  • No bugs detected in your changes, great job!

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, they can

I'm also 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.

Anything else?

No response

### What component of Red (cog, command, API) would you like to see improvements on? Development process ### Describe the enhancement you're suggesting. 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: [Add `--cog-path` CLI argument - Unit Tests](https://github.com/CodeBeaverDemo/Red-DiscordBot/pull/2) that adds comprehensive tests to the last Pull Request that was opened here: [Add `--cog-path` CLI argument](https://github.com/Cog-Creators/Red-DiscordBot/pull/6510) ## What the PR demonstrates: * Increases coverage by 96.00% for `tests/test__cli.py` * Adds 1 comprehensive test file: `tests/test__cli.py` * No bugs detected in your changes, great job! 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, they can * [Check out our repo](https://github.com/codebeaver-ai/codebeaver-ai) * Try the hosted version, which is free and has a ~30seconds setup at [codebeaver.ai](https://www.codebeaver.ai) I'm also 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. ### Anything else? _No response_
aikaterna commented 2025-03-12 17:22:06 +01:00 (Migrated from github.com)

No thank you. Please see your previous offer at https://github.com/Cog-Creators/Red-DiscordBot/discussions/6528.

No thank you. Please see your previous offer at https://github.com/Cog-Creators/Red-DiscordBot/discussions/6528.
erlapso commented 2025-03-12 18:05:38 +01:00 (Migrated from github.com)

Ah sorry about that, I got my notes mixed up and did not notice I pinged you already

Ah sorry about that, I got my notes mixed up and did not notice I pinged you already
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#6536
No description provided.