en un clic
frb-test
// Use when needing to run tests locally in flutter_rust_bridge, or when debugging test failures before pushing
// Use when needing to run tests locally in flutter_rust_bridge, or when debugging test failures before pushing
| name | frb-test |
| description | Use when needing to run tests locally in flutter_rust_bridge, or when debugging test failures before pushing |
Note: Check your user-level
remote-testingrules before running commands. Tests may require remote execution.
Maps change types to local test commands. Tests run on CI by default, so local testing is optional but useful for debugging.
| 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 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.
frb_dartfrb_example/dart_minimalfrb_example/pure_dartfrb_example/pure_dart_pdewasm32-unknown-unknown target: rustup target add wasm32-unknown-unknown --toolchain nightly-2025-02-01rust-src component: rustup component add rust-src --toolchain nightly-2025-02-01wasm-pack: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | shWhen running web tests in Docker containers, puppeteer needs --no-sandbox flag. The test runner auto-detects Docker environment via /.dockerenv.
Run: Debugging test failure, developing new tests, verifying fix before push
Skip: Documentation only, CI will catch it, just checking compilation
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:
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, test weakening, or Gemini feedback.
Use when the user wants Docker-based FRB development or Tart-based iOS Simulator validation.
Use when preparing or explaining the FRB Tart base VM for iOS Simulator validation, including local OCI registry mirroring, direct OCI clone, and base VM hygiene.
Explain how cargokit is sourced, copied, and analyzed inside flutter_rust_bridge. Use when working on `integration_template/**/cargokit`, `frb_example/**/cargokit`, integrate/generate output drift, or any diff that mentions cargokit and you need to identify the true source of truth before judging the change.
Use when about to create a PR or push changes in flutter_rust_bridge to ensure code generation is up to date
Use when implementing a GitHub issue, bug fix, or feature in flutter_rust_bridge end-to-end: develop the change, add regression coverage, prepare and open a PR, monitor CI until green, request and resolve Gemini review, and keep following up on a 5 minute cadence until the PR is ready.
Review a flutter_rust_bridge PR before treating it as ready, including subagent checks for correctness and test weakening plus Gemini review.