cometchat-android-v5-testing — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited cometchat-android-v5-testing (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Ground truth:com.cometchat:chat-uikit-android:5.x(legacy/maintenance-only; +calls-sdk-android:5.x) — resolved AAR (javap) +ui-kit/android. Official docs: https://www.cometchat.com/docs/ui-kit/android/overview · Docs MCP:claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp(or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
Companion skills:cometchat-android-v5-corecovers init/login patterns you're testing;cometchat-android-v5-componentscovers component APIs to assert against.
This skill teaches how to write and run tests against a CometChat Android integration. Covers unit tests with JUnit + Mockito/MockK, UI tests with Espresso, E2E with Maestro, and CI integration.
cometchat-android-v5-corecometchat-android-v5-troubleshootingWorth testing:
Skip:
Golden rule: if the test fails because YOUR code changed, it's valuable. If it fails because the UIKit updated, it's churn.
| Layer | Tool | Why |
|---|---|---|
| Unit tests | JUnit 4 + Mockito / MockK | Standard Android unit testing |
| Component tests | Robolectric | Run Android component tests without emulator |
| UI tests | Espresso | Android's native UI testing framework |
| E2E | Maestro | Declarative YAML flows, fast, stable |
| CI | GitHub Actions / Bitrise | Automated test runs |
Java (Mockito):
@RunWith(MockitoJUnitRunner.class)
public class ChatViewModelTest {
@Test
public void testLoginCallsInit() {
try (MockedStatic<CometChatUIKit> mocked = mockStatic(CometChatUIKit.class)) {
mocked.when(CometChatUIKit::getLoggedInUser).thenReturn(null);
mocked.when(CometChatUIKit::isSDKInitialized).thenReturn(true);
// Test your ViewModel or helper that calls login
// Verify init was called before login
}
}
}Kotlin (MockK):
@Test
fun `already logged in skips login`() {
mockkStatic(CometChatUIKit::class)
every { CometChatUIKit.getLoggedInUser() } returns mockk<User>()
// Your code should skip login
verify(exactly = 0) { CometChatUIKit.login(any(), any()) }
unmockkAll()
}@RunWith(AndroidJUnit4.class)
public class MessagesActivityTest {
@Rule
public ActivityScenarioRule<MessagesActivity> rule =
new ActivityScenarioRule<>(MessagesActivity.class);
@Test
public void messageListIsDisplayed() {
onView(withId(R.id.messageList)).check(matches(isDisplayed()));
}
@Test
public void composerIsDisplayed() {
onView(withId(R.id.composer)).check(matches(isDisplayed()));
}
}.maestro/chat-happy-path.yaml:
appId: com.yourapp.android
---
- launchApp
- tapOn: "Login"
- inputText: "cometchat-uid-1"
- tapOn: "Continue"
- assertVisible: "Chats"
- tapOn:
id: "conversations"
index: 0
- assertVisible: "Type a message"
- inputText: "Hello from Maestro"
- tapOn:
id: "send_button"
- assertVisible: "Hello from Maestro"Run: maestro test .maestro/chat-happy-path.yaml
# .github/workflows/test.yml
name: test
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- run: ./gradlew test| Symptom | Cause | Fix |
|---|---|---|
NoClassDefFoundError: CometChat | SDK not mocked | Add Mockito/MockK mock for static methods |
| Espresso test hangs | Async CometChat operation | Register IdlingResource |
| Tests pass locally, fail on CI | Emulator not booted | Pin emulator API level in CI |
IllegalStateException: not initialized | init() not called in test setup | Mock isSDKInitialized() to return true |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.