create-unit-test
Create and run unit tests for AnySoftKeyboard following project architecture guidelines (Robolectric, naming, location).
Introduction
This skill acts as an automated guide for software engineers contributing to AnySoftKeyboard, facilitating the creation and maintenance of robust unit tests. It is designed to ensure that code changes remain stable and functional without introducing regressions. The skill enforces the project's specific testing architecture, requiring developers to follow standardized file placement, naming conventions, and the use of the Robolectric framework for testing Android-specific components within the JVM environment.
-
Provides clear structural guidance for test file naming and location, specifically targeting the /src/test/java/ path for unit tests.
-
Guides the implementation of unit tests using the Arrange-Act-Assert (AAA) pattern to improve test readability and maintenance.
-
Mandates the use of Robolectric for Android component testing, ensuring that resources like strings and themes are properly resolved during execution.
-
Encourages the use of Fakes over Mocks or complex patches to maintain test reliability and deterministic behavior.
-
Simplifies the execution of tests via Gradle, providing specific command-line templates for different project modules.
-
Facilitates rapid debugging by pointing developers to the correct location for XML-based test failure reports generated by Gradle.
-
Intended for developers working on bug fixes, feature development, or refactoring within the AnySoftKeyboard codebase.
-
Focuses on identifying core functionality, edge cases, and error scenarios before suggesting implementation details.
-
Emphasizes that all tests should be placed in the test source set, discouraging the use of androidTest for general unit tests to keep CI build times efficient.
-
Helps troubleshoot test failures by directing the user to locate specific failure logs in build/test-results/ directories.
-
Maintains project hygiene by enforcing consistent testing practices and avoiding flaky tests that impact repository stability.
Repository Stats
- Stars
- 3,288
- Forks
- 917
- Open Issues
- 1,073
- Language
- Java
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 04:45 AM