frb-test
fzyzcjy/flutter_rust_bridge/.claude/skills/frb-test/SKILL.md
Use when needing to run tests locally in flutter_rust_bridge, or when debugging test failures before pushing
Skill5.4k starsChanged 27 days ago
- Pipes a download into a shell
What's in it
- FRB Testing
- Overview
- Quick Reference
- Web Tests
- Supported Packages
- Requirements
- Running in Docker
- When to Test Locally
- CI Discipline
--- name: frb-test description: Use when needing to run tests locally in flutter_rust_bridge, or when debugging test failures before pushing --- # FRB Testing > **Note:** Read `frb-dev-env` before running commands and follow the active user's environment rules. ## Overview Maps change types to local test commands. Tests run on CI by default, so local testing is optional but useful for debugging. ## Quick Reference | Change Type | Command | |-------------|---------| | All Rust packages | `./frb_internal test-rust` | | `frb_rust/` | `./frb_internal test-rust-package --package frb_rust` | | `frb_codegen/` | `./frb_internal test-rust-package --package frb_codegen` | | Specific Rust package | `./frb_internal test-rust-package --package <path>` | | `frb_dart/` | `./frb_internal test-dart-native --package frb_dart` | | Dart example | `./frb_internal test-dart-native --package frb_example/<name>` | | Flutter example | `./frb_internal test-flutter-native --package frb_example/flutter_<name>` | | Web test | `./frb_internal test-dart-web --package frb_example/<name>` | ## Web Tests Web tests compile Dart tests to WebAssembly and run in a headless browser. Some individual web test cases are flaky; rerun the failed web test job or command before treating the failure as deterministic. ### Supported Packages - `frb_dart` - `frb_example/dart_minimal` - `frb_example/pure_dart` - `frb_example/pure_dart_pde` ### Requirements - `wasm32-unknown-unknown` target: `rustup target add wasm32-unknown-unknown --toolchain nightly-2025-02-01` - `rust-src` component: `rustup component add rust-src --toolchain nightly-2025-02-01` - `wasm-pack`: `curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh` - Chrome/Chromium browser ### Running in Docker When running web tests in Docker containers, puppeteer needs `--no-sandbox` flag. The test runner auto-detects Docker environment via `/.dockerenv`. ## When to Test Locally **Run:** Debugging test failure, developing new tests, verifying fix before push **Skip:** Documentation only, CI will catch it, just checking compilation ## CI Discipline CI is slow and often queues for a long time. Before pushing a non-trivial FRB change, run meaningful local tests in the appropriate development environment and understand the result locally first. Scale the local test scope with the risk and blast radius of the change. Do not use CI as the first feedback loop for changes that can be verified locally. Choose tests by blast radius: - Runtime changes: run the relevant Rust package tests - Generated or example API changes: run the focused Dart or Flutter example test first - Codegen changes: run generation and the affected example tests After pushing to a PR branch, monitor GitHub Actions until the run reaches a terminal state. If CI fails, inspect the failing job logs and either fix the issue or clearly report why it is unrelated or flaky. Do not leave a PR in an unknown queued or in-progress state when the user asked for CI validation. Before treating a non-trivial PR as ready, run the review gate in `frb-pr-review`; local tests alone do not check correctness review or test weakening.
More agent context in fzyzcjy/flutter_rust_bridge
30 other files this repository gives its agents.
AGENTS.md
CLAUDE.md
Skill
- frb-add-contributor.claude/skills/frb-add-contributor/SKILL.md
- frb-android-emulator-prepare.claude/skills/frb-android-emulator-prepare/SKILL.md
- frb-cargokit-dev.claude/skills/frb-cargokit-dev/SKILL.md
- frb-cargokit.claude/skills/frb-cargokit/SKILL.md
- frb-categorize-code-diff.claude/skills/frb-categorize-code-diff/SKILL.md
- frb-ci-filter.claude/skills/frb-ci-filter/SKILL.md
- frb-code-generation.claude/skills/frb-code-generation/SKILL.md
- frb-debugging.claude/skills/frb-debugging/SKILL.md
- frb-develop-feature.claude/skills/frb-develop-feature/SKILL.md
- frb-dev-env.claude/skills/frb-dev-env/SKILL.md
- frb-docker.claude/skills/frb-docker/SKILL.md
- frb-feature-flag.claude/skills/frb-feature-flag/SKILL.md
- frb-fix-ci.claude/skills/frb-fix-ci/SKILL.md
- frb-fix-codecov.claude/skills/frb-fix-codecov/SKILL.md
- frb-fix-main-ci.claude/skills/frb-fix-main-ci/SKILL.md
- frb-fix-merge-conflict.claude/skills/frb-fix-merge-conflict/SKILL.md
- frb-issue-to-green-pr.claude/skills/frb-issue-to-green-pr/SKILL.md
- frb-lint.claude/skills/frb-lint/SKILL.md
- frb-manual-test.claude/skills/frb-manual-test/SKILL.md
- frb-pr-chain-split.claude/skills/frb-pr-chain-split/SKILL.md
- frb-prepare-pr.claude/skills/frb-prepare-pr/SKILL.md
- frb-pr-review.claude/skills/frb-pr-review/SKILL.md
- frb-publish-release.claude/skills/frb-publish-release/SKILL.md
- frb-tart-prepare.claude/skills/frb-tart-prepare/SKILL.md
- frb-upgrade-docker.claude/skills/frb-upgrade-docker/SKILL.md
- frb-upgrade-flutter.claude/skills/frb-upgrade-flutter/SKILL.md
- frb-vmware-windows-prepare.claude/skills/frb-vmware-windows-prepare/SKILL.md
- frb-write-changelog.claude/skills/frb-write-changelog/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
Reports can't be read right now.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool registry_write, action report. How to connect one.

