Skip to content

Conversation

@markpete
Copy link
Contributor

@markpete markpete commented Dec 5, 2025

How to Run Tests

You can run the tests using the Gradle wrapper:

./gradlew test

How to Debug Tests

You can debug tests directly in VS Code:

  1. Open the test file (e.g., src/test/java/frc/robot/ExampleTest.java).
  2. Click the "Run" or "Debug" codelens above the test method or class.
  3. Alternatively, use the Testing view in the sidebar to run or debug specific tests.

@gemini-code-assist
Copy link

Summary of Changes

Hello @markpete, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the project's testing infrastructure by introducing unit testing and mocking capabilities. It integrates the Mockito framework with JUnit 5, providing developers with powerful tools to write isolated and robust tests. The changes include necessary dependency updates, practical examples of both basic and advanced mocking techniques, and comprehensive documentation to guide users on running and debugging tests, ultimately aiming to improve code quality and maintainability.

Highlights

  • Dependency Addition: Mockito, a popular mocking framework for Java, has been integrated into the project. This includes adding mockito-core and mockito-junit-jupiter as test dependencies in build.gradle and defining their versions in gradle/libs.versions.toml.
  • New Unit Test Examples: Two new example test files, ExampleTest.java and AllianceUtilsTest.java, have been added. These files demonstrate basic JUnit 5 assertions and advanced Mockito features, including mocking interfaces and static methods (e.g., DriverStation).
  • Testing Documentation: A new markdown file, src/test/TestHowTo.md, has been added. This document provides clear instructions on how to run tests using the Gradle wrapper and how to debug tests directly within VS Code, making it easier for developers to get started with testing.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@markpete
Copy link
Contributor Author

markpete commented Dec 5, 2025

@iamawesomecat - Here you go...

gemini-code-assist[bot]

This comment was marked as resolved.

@iamawesomecat
Copy link
Contributor

To clarify to readers, I asked for a code example for how we'd use unit tests in for the future. This will likely not be merged into main for this robot, and if I implement it, it will be on the 2026 repository.

@markpete markpete marked this pull request as draft December 6, 2025 20:45
@markpete
Copy link
Contributor Author

markpete commented Dec 9, 2025

Closing this PR, since we don't want to merge. @iamawesomecat can still review in closed state.

@markpete markpete closed this Dec 9, 2025
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

Successfully merging this pull request may close these issues.

3 participants