[PR #6370] [MERGED] Add Android testing skill for Claude #32537

Closed
opened 2026-04-18 15:54:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6370
Author: @SaintPatrck
Created: 1/15/2026
Status: Merged
Merged: 2/2/2026
Merged by: @SaintPatrck

Base: mainHead: claude/testing-android-code-skill


📝 Commits (6)

  • db99690 Add Android testing skill for Claude
  • 36af6b0 Refactor test examples to use top-level default state
  • a7f789c Fix test examples to match actual codebase patterns
  • b14b59a Update test base classes reference to point to example files
  • 43b52a6 Use assertNull where appropriate
  • 5c0f4f4 Correct TestHelpers path

📊 Changes

8 files changed (+2347 additions, -0 deletions)

View changed files

.claude/skills/testing-android-code/README.md (+44 -0)
.claude/skills/testing-android-code/SKILL.md (+319 -0)
.claude/skills/testing-android-code/examples/compose-screen-test-example.md (+337 -0)
.claude/skills/testing-android-code/examples/repository-test-example.md (+255 -0)
.claude/skills/testing-android-code/examples/viewmodel-test-example.md (+161 -0)
.claude/skills/testing-android-code/references/critical-gotchas.md (+698 -0)
.claude/skills/testing-android-code/references/flow-testing-patterns.md (+274 -0)
.claude/skills/testing-android-code/references/test-base-classes.md (+259 -0)

📄 Description

🎟️ Tracking

TBD

📔 Objective

Introduce a new Claude skill named testing-android-code to provide comprehensive guidance and standardized patterns for writing tests within the Bitwarden Android codebase.

The primary objective is to codify best practices and provide Claude with quick access to reference documentation, examples, and common pitfalls, thereby improving test quality, consistency, and development efficiency.

The skill is composed of the following documents:

  • A main SKILL.md file that serves as a quick-reference guide, outlining key patterns for testing ViewModels, Compose UIs, Repositories, and Services. It also introduces test data builders and utility classes.
  • A README.md explaining the purpose and contents of the skill.
  • Detailed reference documents for:
    • test-base-classes.md: Explains the usage of BaseViewModelTest, BitwardenComposeTest, and BaseServiceTest.
    • flow-testing-patterns.md: Details how to test StateFlow and EventFlow using Turbine, highlighting the critical differences in their testing patterns.
    • critical-gotchas.md: Lists common antipatterns and mistakes, such as misusing assertCoroutineThrows with runTest and forgetting to unmock static functions.
  • Complete, copy-pasteable examples for testing major components:
    • viewmodel-test-example.md
    • compose-screen-test-example.md
    • repository-test-example.md

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/6370 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 1/15/2026 **Status:** ✅ Merged **Merged:** 2/2/2026 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `claude/testing-android-code-skill` --- ### 📝 Commits (6) - [`db99690`](https://github.com/bitwarden/android/commit/db99690ebcb15a8cee8a9f54a47621ec0b5e85f1) Add Android testing skill for Claude - [`36af6b0`](https://github.com/bitwarden/android/commit/36af6b0934b24c86ac7450760eb140e9bd9ee9af) Refactor test examples to use top-level default state - [`a7f789c`](https://github.com/bitwarden/android/commit/a7f789c668aa34f148fc1df2df42168601668f55) Fix test examples to match actual codebase patterns - [`b14b59a`](https://github.com/bitwarden/android/commit/b14b59a789bbfe5fcc1b9b4d466d726053b22e02) Update test base classes reference to point to example files - [`43b52a6`](https://github.com/bitwarden/android/commit/43b52a6ba935be9a6abcaaadcca95b2410ba5986) Use assertNull where appropriate - [`5c0f4f4`](https://github.com/bitwarden/android/commit/5c0f4f45c78ca7df2bb246928ffba3aabef8a240) Correct TestHelpers path ### 📊 Changes **8 files changed** (+2347 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `.claude/skills/testing-android-code/README.md` (+44 -0) ➕ `.claude/skills/testing-android-code/SKILL.md` (+319 -0) ➕ `.claude/skills/testing-android-code/examples/compose-screen-test-example.md` (+337 -0) ➕ `.claude/skills/testing-android-code/examples/repository-test-example.md` (+255 -0) ➕ `.claude/skills/testing-android-code/examples/viewmodel-test-example.md` (+161 -0) ➕ `.claude/skills/testing-android-code/references/critical-gotchas.md` (+698 -0) ➕ `.claude/skills/testing-android-code/references/flow-testing-patterns.md` (+274 -0) ➕ `.claude/skills/testing-android-code/references/test-base-classes.md` (+259 -0) </details> ### 📄 Description ## 🎟️ Tracking TBD ## 📔 Objective Introduce a new Claude skill named `testing-android-code` to provide comprehensive guidance and standardized patterns for writing tests within the Bitwarden Android codebase. The primary objective is to codify best practices and provide Claude with quick access to reference documentation, examples, and common pitfalls, thereby improving test quality, consistency, and development efficiency. The skill is composed of the following documents: - A main `SKILL.md` file that serves as a quick-reference guide, outlining key patterns for testing ViewModels, Compose UIs, Repositories, and Services. It also introduces test data builders and utility classes. - A `README.md` explaining the purpose and contents of the skill. - Detailed reference documents for: - `test-base-classes.md`: Explains the usage of `BaseViewModelTest`, `BitwardenComposeTest`, and `BaseServiceTest`. - `flow-testing-patterns.md`: Details how to test StateFlow and EventFlow using Turbine, highlighting the critical differences in their testing patterns. - `critical-gotchas.md`: Lists common antipatterns and mistakes, such as misusing `assertCoroutineThrows` with `runTest` and forgetting to unmock static functions. - Complete, copy-pasteable examples for testing major components: - `viewmodel-test-example.md` - `compose-screen-test-example.md` - `repository-test-example.md` ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-18 15:54:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#32537