/cometchat-skills:cometchat-android-v6-testingfrom cometchat-skills
Tests Android apps using CometChat v6 UI Kit by wrapping the SDK behind a repository interface, unit-testing init/login/credential hygiene, and writing instrumented Compose UI tests for chat screens.
Ships in cometchat-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Ground truth: the installed kit's API shape (
CometChatUIKitstatic object;CometChatstatic singleton) +contracts.android-v6.json. The UI Kit ships no test doubles or test APIs — nothing below invents one; the testable seam is code YOU write around the SDK. Verify symbols against catalogandroid-v6.json.
cometchat-android-v6-core — install, credentials, initFromSettings → login → render, lifecycle, sizing. Assumed here, never repeated.cometchat-android-v6-production — the release checks these tests protect."how do we test this?", "mock CometChat in unit tests", "write a UI test for the chat screen", "add CometChat checks to CI", "how do I test login without hitting the network?".
Standard Android testing stack only — JUnit4, a mocking library (MockK for Kotlin), androidx.test/Espresso for Views, androidx.compose.ui:ui-test-junit4 for Compose. No CometChat test artifact exists; don't look for one.
CometChatUIKit and CometChat are static singletons, so they can't be injected or faked directly in a JVM unit test. Wrap the calls your app makes behind a small interface and depend on THAT:
interface ChatSession {
fun isLoggedIn(): Boolean
fun login(uid: String, onResult: (Result<User>) -> Unit)
fun logout(onResult: (Result<Unit>) -> Unit)
}
class RealChatSession : ChatSession { // the only class that touches the SDK
override fun isLoggedIn() = CometChatUIKit.getLoggedInUser() != null
override fun login(uid: String, onResult: (Result<User>) -> Unit) =
CometChatUIKit.login(uid, object : CometChat.CallbackListener<User>() {
override fun onSuccess(user: User) = onResult(Result.success(user))
override fun onError(e: CometChatException) = onResult(Result.failure(e))
})
override fun logout(onResult: (Result<Unit>) -> Unit) { /* ... */ }
}
Your ViewModels/screens take ChatSession; unit tests pass a fake. This one wrapper is what makes the rest of this skill possible — without it, "mocking CometChat" means static mocking (mockkStatic), which is brittle and should be a last resort.
onError path produces an ERROR state (not a permanent spinner or a blank screen).cometchat-settings.json is gitignored; for release, assert the packaged assets carry no authKey (→ cometchat-android-v6-production).add*Listener(ID, ...) your code makes, assert the matching remove*Listener(ID) runs on teardown (fake session records calls; assert balanced). Leaked listeners are the classic Android CometChat bug.createAndroidComposeRule<YourActivity>(), then assert on YOUR wrappers/state — a header title, an error/empty state you render, a nav destination. Kit internals have no guaranteed test tags, so don't assert on kit-internal node structure; it will break on every kit upgrade.R.id.message_list displayed), not its internal children../gradlew :app:assembleDebug # in YOUR app (npm run verify:fences:android-v6 is a pack-repo gate)).local.properties/BuildConfig, never committed.Trying to mock CometChatUIKit directly instead of wrapping it · asserting on kit-internal view hierarchy (breaks every upgrade) · unit tests that hit the real backend (flaky + rate-limited) · sharing one test user across parallel runs (state collisions) · no test for the error path (the most common production failure) · committing test credentials · claiming push/calling are covered by CI when they aren't.
./gradlew test (unit, with fakes — no network) and ./gradlew connectedAndroidTest (instrumented, seeded app) pass; the credential-hygiene check fails loudly when you deliberately plant a key; the fence gate compiles (./gradlew :app:assembleDebug # in YOUR app (npm run verify:fences:android-v6 is a pack-repo gate)). State clearly in your summary which behaviors are covered by tests and which were verified manually on a device (push, calling) — never imply automation you didn't build.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cometchat, android-testing, unit-test, compose-ui-test, mockk
npx claudepluginhub cometchat/cometchat-skills --plugin cometchat-skills98 skills in this plugin
/cometchatEntry point for any CometChat task on any platform. Detects the framework + UI Kit version (React, Angular, iOS, Android, React Native, Flutter), then routes to that family's skills — for a NEW integration or a change to an existing one. Triggers: 'add chat', 'add cometchat', 'add chat to my app', 'add calling', 'change something in my chat', 'my chat is already set up', 'add a feature to the chat', 'add chat to my android app', 'integrate cometchat android', 'add chat to my ios app', 'integrate cometchat ios', 'add chat to my swift app', 'migrate my app to cometchat', 'migrate from sendbird', 'migrate from getstream / stream', 'replace sendbird / stream chat with cometchat', 'build a <app> clone', 'make a chat app like <app>', 'make it look and work like <app>'./cometchat-a11yKeep a CometChat integration accessible — the UI Kit is designed targeting WCAG 2.1 AA with keyboard navigation (verify per component in its docs; full conformance still needs manual testing), and this skill makes sure the HOST app doesn't break that, covering contrast, focus, screen-reader context, reduced motion, RTL, and calls accessibility. Cross-family. Triggers: 'is cometchat accessible', 'WCAG / 508 / ADA compliance', 'screen reader support', 'keyboard navigation', 'a11y audit', 'accessible chat', 'contrast/focus issues in chat'.Other plugins' skills for the same job