# Flutter Testing Standards

> Unit, widget, and integration testing using mocktail and bloc_test.

- **Type:** Skill
- **Install:** `agentstack add skill-ngxtm-devkit-testing`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ngxtm](https://agentstack.voostack.com/s/ngxtm)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ngxtm](https://github.com/ngxtm)
- **Source:** https://github.com/ngxtm/devkit/tree/main/rules/flutter/testing

## Install

```sh
agentstack add skill-ngxtm-devkit-testing
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Testing Standards

## **Priority: P1 (HIGH)**

Ensuring code reliability through multi-layered testing strategies.

## Structure

```text
test/
├── unit/ # Business logic & mapping (Blocs, Repositories, UseCases)
├── widget/ # UI component behavior (Screens, Widgets)
└── integration/ # End-to-end flows
```

## Implementation Guidelines

- **Testing Pyramid**: Maintain ~70% Unit Tests, ~20% Widget Tests, ~10% Integration Tests.
- **Mocks**: Use `mocktail` for type-safe, boilerplate-free mocking.
- **Unit Tests**: Test logic in isolation. Verify all edge cases (Success, Failure, Exception).
- **Widget Tests**: Test high-value interactions (Button clicks, Error states, Loading indicators).
- **BLoC Tests**: Use `blocTest` to verify state emission sequences.
- **Code Coverage**: Aim for 80%+ coverage on Domain and Presentation (Logic) layers.

## Deep Dive References

- [Unit Testing Strategies](./references/unit-testing.md) (Test Data Builders, Mocktail)
- [Widget Testing Strategies](./references/widget-testing.md) (Robot Pattern)
- [Integration Testing](./references/integration-testing.md) (Shared Robots, Real Device)
- [Robot Pattern Implementation](./references/robot-pattern.md)

## Related Topics

layer-based-clean-architecture | dependency-injection | cicd

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ngxtm](https://github.com/ngxtm)
- **Source:** [ngxtm/devkit](https://github.com/ngxtm/devkit)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-ngxtm-devkit-testing
- Seller: https://agentstack.voostack.com/s/ngxtm
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
