Skip to content

Conversation

@SaintPatrck
Copy link
Contributor

๐ŸŽŸ๏ธ 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 commit introduces 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 developers 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`
@github-actions github-actions bot added the t:ci Change Type - Updates to automated workflows label Jan 15, 2026
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

โœ… All modified and coverable lines are covered by tests.
โœ… Project coverage is 85.46%. Comparing base (98ba169) to head (cc9edf0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6370   +/-   ##
=======================================
  Coverage   85.46%   85.46%           
=======================================
  Files         764      764           
  Lines       54881    54881           
  Branches     7930     7930           
=======================================
  Hits        46902    46902           
  Misses       5226     5226           
  Partials     2753     2753           

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

๐Ÿš€ New features to boost your workflow:
  • โ„๏ธ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

Logo
Checkmarx One โ€“ Scan Summary & Details โ€“ 93b8cd3a-bb6d-498d-8840-fae45ed40923

Great job! No new security vulnerabilities introduced in this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t:ci Change Type - Updates to automated workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants