Skip to content
T

testability-obstacle

MUST USE for C#/.NET deterministic tests

by dotnetFree

#4365in AI Skills
0In stores

Description

testability-obstacle is an agent skill for C# and .NET projects that helps write deterministic tests when the code under test depends on som…

Highlights

  • Adds the smallest behaviour-preserving seam for a dependency
  • Covers time, delays, randomness, environment, filesystem and console
  • Writes deterministic tests that prove the seam works
  • Avoids process-global mutation in tests

Ratings & Reviews

No ratings yet

Be the first to rate testability-obstacle.

People also visit

R

run-tests

ALWAYS USE before running .NET tests or answering with a test command or flags

AI Skills
Get
D

dotnet-best-practices

Validate .NET/C# code against comprehensive best practices for your solution

AI Skills
Get
M

modern-csharp-coding-standards

Write modern, high-performance C# code

AI Skills
Get
W

writing-mstest-tests

ALWAYS USE when asked to fix, rewrite, update, improve, modernize

AI Skills
Get
P

platform-detection

Identify a .NET project's test platform, framework, command mode

AI Skills
Get
M

migrate-vstest-to-mtp

Use this skill before answering, planning

AI Skills
Get

testability-obstacle FAQ

What problem does it solve?

Tests that depend on the real clock, the filesystem, randomness or other ambient state, which makes them flaky. The skill adds a small seam so the test can control that dependency.

Does it rewrite my code?

It makes the smallest production edit needed for the requested test and keeps the behaviour the same. It does not redesign adjacent code.

When should I not use it?

When you have not allowed a small production change. The skill adds a seam when you permit it or ask for one.

How do I install it?

Run npx skills add https://github.com/dotnet/skills --skill testability-obstacle in a terminal.

Which security audits has it passed?

Gen Agent Trust Hub Pass, Socket Pass, Snyk Pass.

What are the best testability-obstacle alternatives?

Popular alternatives to testability-obstacle include run-tests, dotnet-best-practices and modern-csharp-coding-standards. See all testability-obstacle alternatives

Developer Stuff

Badges