The intent of this project is to experiment with different ways to programatically test our code without needing access to the robot or equipment (like a controller). We want to avoid "magic" (ie. code we don't understand) and utilize our vendor libraries.
This includes:
- Using Phoenix 6's built-in simulation capabilities
- Moving TunerX generated configuration into properties files
- Creating utilities and patterns for common testing needs
Install these before running the project:
- JDK 17
- FRC VSCode 2025
- new: VSCode Extension Pack for Java: VSCode extension for Java (testing, autocomplete, etc/)
Apart from the standard FRC/WPI libraries, the following libraries are important to testing:
- Awaitility: handles polling logic for async events (ex. command execution after)
- jUnit: makes assertions expected behavior and tolerances
These are installed by Gradle.
You can run tests using Gradle's test task:
./gradlew testThe test runner from the VSCode Extension Pack for Java will add a "play" icon to testing files. You can click the button next to a particular test method to run just that test or the button next to the class name to run all of the tests in the file (called a suite).
If you want to build without worrying about tests passing, add -x test to your Gradle command.
./gradlew build -x test