Install
$ agentstack add skill-tairitsua-monica-monica-unit-testing ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Monica Unit Testing
Create Monica unit tests under tests/ using the shared root Monica.UnitTests toolkit, Test.Monica.* runnable project naming, xUnit v3 for unit tests, and bUnit for Blazor UI tests. Follow Monica-specific rules for Res assertions, module guide testing, sociable host tests, and UI page or component boundaries instead of inventing per-project test conventions.
When To Use
- Add a new Monica unit test project.
- Extend or refactor tests under
tests/. - Define Monica-wide test rules, test layout, or naming standards.
- Add reusable test helpers to
Monica.UnitTests/. - Test module guides, module dependencies, facades returning
Res, providers, support classes, or Blazor components and pages. - Create or update a Monica testing skill or testing documentation.
Workflow
- Read
/tests/README.mdfirst. It is the current source of truth for Monica test layout, naming, stack, and WSL execution rules. - Reuse
Monica.UnitTests/before adding project-local helpers. Shared result assertions, module reset helpers, localization stubs, UI theme stubs, and sociable test fixtures belong there. - Keep all unit-test-related artifacts under
tests/. New runnable test projects must use theTest.Monica.*prefix and mirror the source project folder structure. - Prefer public-surface tests first:
Modules/Facades/- public models or abstractions
- stable support classes or in-memory providers
- For UI modules, stay at component level and page-shell level. Use bUnit, deterministic localizers, and fake or in-memory services. Do not introduce browser automation or real backend dependencies into these unit tests.
- After edits, run
dotnet testwith Windows paths under WSL. Keep a single build or test process at a time.
Sociable Application Tests
For Monica-based business applications, prefer the monica-application-unit-testing skill. It defines the exact Test.{ProductionProjectName} architecture, collection fixtures, database isolation choices, and migration rules for command handlers, query handlers, domain services, repositories, and module-registration tests.
Use MonicaApplicationFixture as the default when the service has a startup module. Keep ApplicationServiceFixture as a fast path for narrow, fully substituted handler tests.
Required Conventions
- Shared test infrastructure project:
Monica.UnitTests/Monica.UnitTests.csproj - Runnable test project naming:
tests/Test.Monica.{ProjectName}/ - Test class naming:
{TypeName}Tests - Test method naming:
Method_WhenCondition_ShouldExpectation - Test folders should mirror the source layout, for example:
Modules/Facades/Providers/Services/Pages/Components/UIJobScheduler/Shared/Support/
Monica-Specific Rules
- Assert
Resexplicitly. - Facade tests must assert
Status,Message, andData. - For
Ressuccess paths, always verifyData; Monica has a knownRes.Ok(string)overload trap. - Module tests should not stop at checking static tables.
- Prefer testing required config methods, guide methods, dependency declarations, or service registrations.
- Prefer in-memory and deterministic seams.
- Use in-memory providers, substitutes, or fixed timestamps.
- Avoid real network, real persistence, and
Task.Delay-based waiting. - Use
MonicaApplicationFixturefor sociable application tests when the target has a module startup type. - Override fixture configuration to register test-friendly providers and replace external seams.
- Keep the test assertion on public DI-visible behavior instead of private boot internals.
- Keep
InternalsVisibleToexceptional. - Only add it when public-surface tests genuinely cannot cover critical behavior.
- Scope it narrowly to the corresponding test project.
Default Stack
xUnit v3AwesomeAssertionsNSubstituteNSubstitute.Analyzers.CSharpcoverlet.collectorbUnitfor UI test projects only
Sample Baseline
- Shared infrastructure:
Monica.UnitTests/ - UI infrastructure sample:
tests/Test.Monica.UI/ - Infrastructure sample:
tests/Test.Monica.JobScheduler/ - UI sample:
tests/Test.Monica.JobScheduler.UI/
Use these sample projects before introducing a new pattern. When the new work matches an existing sample, copy the sample structure and adapt it instead of inventing another style.
Read As Needed
references/standards.md- Stable Monica testing rules and decision points.
references/samples.md- Current sample projects, recommended target types, and starter patterns.
../monica-application-unit-testing/SKILL.md- Sociable application testing architecture for Monica-based business services.
Validation
- Use Windows paths for
dotnetcommands in WSL. - Run a single
dotnet buildordotnet testprocess at a time. - Finish by running the relevant solution or project tests, not only by writing scaffolding.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Tairitsua
- Source: Tairitsua/Monica
- License: MIT
- Homepage: https://monica.dpdns.org/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.