{"id":24501204,"url":"https://github.com/team997coders/testablerobot","last_synced_at":"2025-07-04T16:33:18.014Z","repository":{"id":76978571,"uuid":"159086200","full_name":"Team997Coders/TestableRobot","owner":"Team997Coders","description":"An example command robot that demonstrates automated testing using JUnit and Mockito","archived":false,"fork":false,"pushed_at":"2018-12-11T22:44:01.000Z","size":128,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-15T07:27:37.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Team997Coders.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-25T23:55:32.000Z","updated_at":"2018-12-11T22:44:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"c62730c1-2de7-4f7a-8e5f-d0e9307eb2bb","html_url":"https://github.com/Team997Coders/TestableRobot","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Team997Coders/TestableRobot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team997Coders%2FTestableRobot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team997Coders%2FTestableRobot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team997Coders%2FTestableRobot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team997Coders%2FTestableRobot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Team997Coders","download_url":"https://codeload.github.com/Team997Coders/TestableRobot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Team997Coders%2FTestableRobot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263577244,"owners_count":23483130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-21T22:26:02.996Z","updated_at":"2025-07-04T16:33:18.000Z","avatar_url":"https://github.com/Team997Coders.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hello World Testable Command Robot Example\nHere is a suggested approach, based on the command robot template, to create a robot project that can be automation tested using JUnit.\n\nThe project is a hello world example which flashes an LED when a button 1 is pressed on a joystick.\nIn it, I demonstrate exhaustive unit and system tests that you can write and execute, that do\nnot require a roboRio, the HAL, nor local simulation (mocking using Mockito is demonstrated).\n\nIt also has a button 2 that will flash an LED, and then when a digital input is toggled high, a\nsecond LED will flash, turning off the first. Testing of a command group is thus demonstrated.\n\nFinally, the master revision has been clean up though the use of Google Guice. This combines the best of preserving the use of dependency injection to promote testability while at the same time minimizing the down sides of messy object graphs.\n\nThe master branch has been coded against the publically available 2019 alpha WPI version (which uses the 2018 roboRio image). There is a new branch called 2019CleanedUpDI which has been upgraded to 2019.1.1-beta-2 WPILib revision and GradleRIO 2019.1.1-beta-2a. Problem with that branch at this point is that unless you are a beta team, you do not have access to the beta roboRio image, and thus you cannot run this version of the branch as of yet. But there are differences between testing with the 2018 vs. 2019 versions.\nIn addition, the testing framework was upgraded to JUnit5 to be at the same level as WPILib. Current revisons of the beta VSCode plugin generated command robot template\nuse JUnit 4, so it remains to be seen which version WPI will settle on once released.\n\nFor an in-depth walkthough, see [Testable Command Robot](https://www.youtube.com/watch?v=rbSPkhAgLk0) and [Testable Command Groups](https://www.youtube.com/watch?v=DusNuZwCGAM). These videos were recorded against tagged versions of this repository (see comments on video). The master version has changed somewhat and use of Google Guice is discussed in [Cleaning Up Dependency Injection With Guice](https://www.youtube.com/watch?v=QSOkuEqTuSg) \n\n## Usage\n1. Change the team number in ```.wpilib/wpilib_preferences.json``` to your team number.\n2. Modify the paths in ```.vscode/launch.test.json``` to match your environment. Sorry, but it does not appear that\nMS substitution macros yet work here (arg!).\n3. Type ```./gradlew build``` and marvel that testing can be a thing.\n\n## Pending\nThe allwpilib branch now represents a close revision to the testablerobot example that we are attempting to integrate into allwpilib. See [Add java testablerobot example](https://github.com/wpilibsuite/allwpilib/pull/1461).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteam997coders%2Ftestablerobot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteam997coders%2Ftestablerobot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteam997coders%2Ftestablerobot/lists"}