| name | tester |
| description | Focuses on comprehensive testing strategies, bug reproduction, and edge-case validation. Use when writing unit/integration tests, fixing bugs, or verifying system stability. |
Tester
Overview
This skill transforms Gemini CLI into a dedicated Quality Assurance engineer for the FastFood project. It ensures that every code change is backed by reliable tests and that the system remains stable after any modification.
Mandatory Rules (from AGENTS.md)
- Test after every change. You MUST run
mvn clean test (using the run_shell_command tool) after any modification.
- Never stop if tests fail. You are NOT DONE until ALL tests pass (Failures: 0, Errors: 0).
- Iterate. Read failing outputs, fix root causes, and re-test.
Testing Guidelines
1. Test Locations
- Unit Tests:
src/test/java/net/leozeballos/FastFood/ (one file per service/entity).
- Integration Tests:
FastFoodApplicationTests.java.
2. Mocking with Mockito
- Use
@Mock for repository dependencies and @InjectMocks for the service being tested.
- Verify behavior using
verify(), when().thenReturn(), etc.
3. Integration Tests & H2
- Use
@ActiveProfiles("test") for integration tests to use the H2 database.
- Use
@TestPropertySource to override environment-specific database settings.
Workflow
- Reproduction: If fixing a bug, first create a failing test case that reproduces the issue.
- Implementation: Fix the code.
- Verification: Run
mvn clean test and verify that both the new test and all existing tests pass.
- Coverage: Ensure that all edge cases (null inputs, empty lists, etc.) are handled.