Add Library Test
osama-raddad/FireCrasher
Add or update a Robolectric JVM unit test for the FireCrasher library.
Guide for writing and converting Chromium Android unit tests across host Robolectric (chromejunittests) and on-device (chromepublicunittestapk) suites.
$ npx skills add nwjs/chromium.src --skill android-unit-test -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install nwjs/chromium.src android-unit-test --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/skills/android-unit-test .claude/skills/android-unit-test && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "android-unit-test" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/skills/android-unit-test into .claude/skills/android-unit-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "android-unit-test", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/nwjs/chromium.src/tree/main/agents/skills/android-unit-testType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add nwjs/chromium.src --skill android-unit-test -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install nwjs/chromium.src android-unit-test --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .agents/skills && cp -r skills-src/agents/skills/android-unit-test .agents/skills/android-unit-test && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "android-unit-test" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/skills/android-unit-test into .agents/skills/android-unit-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "android-unit-test", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nwjs/chromium.src --skill android-unit-test -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install nwjs/chromium.src android-unit-test --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/agents/skills/android-unit-test .cursor/skills/android-unit-test && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "android-unit-test" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/skills/android-unit-test into .cursor/skills/android-unit-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "android-unit-test", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/nwjs/chromium.src.git --path agents/skills/android-unit-test--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add nwjs/chromium.src --skill android-unit-test -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install nwjs/chromium.src android-unit-test --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/agents/skills/android-unit-test .gemini/skills/android-unit-test && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "android-unit-test" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/skills/android-unit-test into .gemini/skills/android-unit-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "android-unit-test", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install nwjs/chromium.src android-unit-testInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add nwjs/chromium.src --skill android-unit-test -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .github/skills && cp -r skills-src/agents/skills/android-unit-test .github/skills/android-unit-test && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "android-unit-test" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/skills/android-unit-test into .github/skills/android-unit-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "android-unit-test", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nwjs/chromium.src --skill android-unit-test -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install nwjs/chromium.src android-unit-test --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nwjs/chromium.src.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/agents/skills/android-unit-test .opencode/skills/android-unit-test && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "android-unit-test" agent skill from https://github.com/nwjs/chromium.src/tree/main/agents/skills/android-unit-test into .opencode/skills/android-unit-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "android-unit-test", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
android-unit-testGuide for writing and converting Chromium Android unit tests across host Robolectric (chromejunittests) and on-device (chromepublicunittestapk) suites.
Android Unit Test is an agent skill from nwjs/chromium.src. Guide for writing and converting Chromium Android unit tests across host Robolectric (chromejunittests) and on-device (chromepublicunittestapk) suites.
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.
It sits in Testing & QA, covering Unit testing. It works with Android, JUnit and Java. The repository describes itself as: Chromium codebase with NW.js modifications. Based on https://chromium.googlesource.com/chromium/src.git. The licence is BSD-3-Clause.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit a9e8946. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Android Unit Test loads about 1.8k tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 446 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from nwjs/chromium.src at commit a9e8946, republished under its BSD-3-Clause licence (© nwjs). 446 words, ~1,797 tokens.
.claude/skills/android-unit-test/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.This skill provides comprehensive guidance on choosing, writing, running, and
migrating Android test cases across Chromium's three major Java test tiers
(chrome_junit_tests, chrome_public_unit_test_apk, and
chrome_public_test_apk).
When writing or refactoring Android Java tests in Chromium, always aim for the lightest, fastest test tier that satisfies the requirements of the code being tested:
| Target Suite | Execution Environment | Best For | Key Constraints & Rules |
|---|---|---|---|
chrome_junit_tests (junit/) | Host JVM via Robolectric (BaseRobolectricTestRunner) | Pure Java utility methods, data structures, MVC/MVC mediators (*MediatorUnitTest.java), presenter logic, string manipulation, and mock-based testing. | Fastest execution. No actual hardware/emulator required. Cannot execute real native NDK code or live browser profiles without shadow structures or stubs. |
chrome_public_unit_test_apk (unit_device_javatests) | Device / Emulator (BaseJUnit4ClassRunner + @Batch(Batch.UNIT_TESTS)) | Unit tests requiring actual Android device features (such as PackageManager checks, real layout inflating/rendering with BlankUiTestActivity, or localized JNI helper methods like CurrencyFormatter). | Configured with is_unit_test = true: any attempts to initialize the main browser process or start ChromeTabbedActivity will explicitly fail. |
chrome_public_test_apk (javatests/) | Device / Emulator Instrumentation (ChromeTabbedActivityTestRule, BaseJUnit4ClassRunner) | Full end-to-end multi-component browser profile initialization, web page interactions (startOnWebPage, embeddedTestServer), and complex UI flows across Activities. | Heaviest and slowest tier. Should be reserved exclusively for full browser activity & integration flows. |
When converting instrumentation tests from chrome_public_test_apk
(javatests/) to host unit tests (chrome_junit_tests / junit/) or on-device
unit tests (chrome_public_unit_test_apk), follow these key rules:
@Batch in chrome_junit_tests: Robolectric host unit tests on the
JVM are naturally batched by default; do NOT add @Batch annotations to
tests under junit/.@UiThreadTest in chrome_junit_tests: Robolectric tests execute on
the main looper thread automatically. Strip
import androidx.test.annotation.UiThreadTest; and method-level
@UiThreadTest annotations completely when converting to
chrome_junit_tests.CurrencyFormatter in PriceUtils.formatPrice) that cannot be
mocked, place it in chrome_public_unit_test_apk (unit_device_javatests)
instead of chrome_junit_tests.chrome_junit_tests)javatests/src/... to junit/src/...
via git mv.@RunWith(BaseJUnit4ClassRunner.class) or
ChromeJUnit4ClassRunner with:import org.chromium.base.test.BaseRobolectricTestRunner;
@RunWith(BaseRobolectricTestRunner.class)@Batch(...) and @UiThreadTest.ThreadUtils.runOnUiThreadBlocking(() -> Mockito.mock(...)) with direct
Mockito initialization: Mockito.mock(...).BUILD.gn: Move the test source out of the javatests target
into a robolectric_library("junit") target:robolectric_library("junit") {
testonly = true
sources = [
"junit/src/org/chromium/chrome/browser/mycomponent/MyComponentUnitTest.java",
]
deps = [
":java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
]
}chrome_public_unit_test_apk)@RunWith(BaseJUnit4ClassRunner.class) along
with @Batch(Batch.UNIT_TESTS) or @Batch(Batch.PER_CLASS).BUILD.gn: Define a dedicated unit_device_javatests
target within your component and register it inside
chrome_public_unit_test_apk (//chrome/android/BUILD.gn):android_library("unit_device_javatests") {
testonly = true
resources_package = "org.chromium.chrome.browser.mycomponent"
sources = [ "javatests/src/org/chromium/chrome/browser/mycomponent/MyComponentDeviceUnitTest.java" ]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/junit",
]
}Before running tests locally, always compile the specific target first.
chrome_junit_tests)autoninja -C out/Debug chrome_junit_tests && \
out/Debug/bin/run_chrome_junit_tests -f "*MyComponentUnitTest*"chrome_public_unit_test_apk)Always specify your emulator or device explicitly with -d:
autoninja -C out/Debug chrome_public_unit_test_apk && \
out/Debug/bin/run_chrome_public_unit_test_apk -f "*MyComponentDeviceUnitTest*" -d emulator-5554© nwjs, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in agents/skills/android-unit-test of nwjs/chromium.src.
Open the folder on GitHubat commit a9e8946
Android Unit Test next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Android Unit Test this skillnwjs/chromium.src | 160 | — | ~1.8k | Automated safety check: Pass | BSD-3-Clause | |
| Add Library Testosama-raddad/FireCrasher | 147 | — | ~612 | Automated safety check: Pass | Apache-2.0 | |
| Debug Surefireeclipse-rdf4j/rdf4j | 420 | — | ~2.4k | Automated safety check: Pass | BSD-3-Clause | |
| Minecraft TestingJahrome907/minecraft-agent-skills | 166 | — | ~3.8k | Automated safety check: Pass | MIT | |
| Eclipse Testgradusnikov/eclipse-chatgpt-plugin | 171 | — | ~1k | Automated safety check: Pass | MIT | |
| Unit TestingLeavesfly/Jimi | 237 | — | ~667 | Automated safety check: Pass | None |
osama-raddad/FireCrasher
Add or update a Robolectric JVM unit test for the FireCrasher library.
eclipse-rdf4j/rdf4j
Debug Maven Surefire unit tests by running them in JDWP "wait for debugger" mode (-Dmaven.surefire.debug) and attaching to the forked test JVM using jdb (preferred for CLI/agent debugging)…
Jahrome907/minecraft-agent-skills
Design and implement automated tests for current Minecraft 26.x or legacy 1.21.x mods and plugins using JUnit, MockBukkit, NeoForge Game Tests, or Fabric Game Tests.
gradusnikov/eclipse-chatgpt-plugin
Run JUnit tests in Eclipse projects — all tests, by package, by class, or individual test methods.
Leavesfly/Jimi
Java单元测试编写指南(基于JUnit和Mockito)
DataDog/dd-trace-java
Convert JUnit 5 @MethodSource/@CsvSource/@ValueSource parameterized tests to @TableTest (JDK8)
nwjs/chromium.src
Extracts raw trace data from Perfetto traces, runs arbitrary SQL queries for custom follow-up analysis, and applies expert cognitive principles (Tiered Flow Analysis, Semantic Mismatch, Redundancy)…
nwjs/chromium.src
Autonomous multi-agent performance optimization loop for Chromium and V8.
nwjs/chromium.src
Automated Tracing & Performance Telemetry in Chromium using Perfetto and Telemetry benchmarks.
nwjs/chromium.src
Queries Chrome commit, version, release, and milestone metadata.
nwjs/chromium.src
Search and reference Chromium documentation from the local docs index, including design docs, APIs, and development guides.
nwjs/chromium.src
Diagnose Chromium GN dependency and include-visibility failures, including BUILD.gn deps/publicdeps, DEPS include rules, private headers, and circular dependencies.
Categories
Guide for writing and converting Chromium Android unit tests across host Robolectric (chromejunittests) and on-device (chromepublicunittestapk) suites. src. Guide for writing and converting Chromium Android unit tests across host Robolectric (chromejunittests) and on-device (chromepublicunittestapk) suites.
Android Unit Test fits situations like: tasks that involve Unit testing.
Run `npx skills add nwjs/chromium.src --skill android-unit-test -a claude-code`. Or copy the skill folder (agents/skills/android-unit-test in nwjs/chromium.src) into .claude/skills/android-unit-test in your project. Claude Code loads it when a task matches its description.
Run `npx skills add nwjs/chromium.src --skill android-unit-test -a codex`. Or copy the skill folder (agents/skills/android-unit-test in nwjs/chromium.src) into .agents/skills/android-unit-test in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nwjs/chromium.src --skill android-unit-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/android-unit-test, .gemini/skills/android-unit-test, .github/skills/android-unit-test and .opencode/skills/android-unit-test in your project.
Going by SKILL.md and its folder, Android Unit Test needs the command-line tools its instructions call (git).
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Android Unit Test is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Android Unit Test: Add Library Test (osama-raddad/FireCrasher, 147 stars), Debug Surefire (eclipse-rdf4j/rdf4j, 420 stars), Minecraft Testing (Jahrome907/minecraft-agent-skills, 166 stars) and Eclipse Test (gradusnikov/eclipse-chatgpt-plugin, 171 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
nwjs (a GitHub organization) maintains it in nwjs/chromium.src, which has 160 GitHub stars. The repository holds 64 skills in this directory. The repository was last updated on October 3, 2026.
Source: nwjs/chromium.src on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.