agentleFS
syncfusionsyncfusion/maui-toolkit/.github/skills/testing-guide/SKILL.md

testing-guide

Skill749 starsChanged 14 months agoMITView on GitHub

Writes or reviews unit tests for Syncfusion Toolkit for .NET MAUI controls. Covers what to test, impossible scenarios, naming conventions, and skipped test documentation. Can be invoked standalone or called from any agent (issue-resolver, test-writer, etc.).

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write or review xUnit tests for a Syncfusion Toolkit for .NET MAUI control change.

    line 8
  2. Distinctive:

    If no test file exists for the control area, create one following the naming pattern of adjacent test files.

    line 40
  3. Distinctive:

    Add tests for all scenarios that are possible given the control's design:

    line 46
  4. Distinctive:

    Do NOT write tests for scenarios that are architecturally impossible.

    line 77

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Testing Guide

Write or review xUnit tests for a Syncfusion Toolkit for .NET MAUI control change.

When to Use This Skill

  • ✅ Writing new tests after a bug fix or feature
  • ✅ Reviewing whether existing tests cover a change adequately
  • ✅ Called from another agent to handle the test-writing step

Inputs Required

The caller (agent or user) must provide:

InputDescription
Control areae.g., Chart, Calendar, Popup
What changedA summary of the fix or feature that was implemented
Affected filesSource files that were modified

Step 1: Locate the Test File

maui/tests/Syncfusion.Maui.Toolkit.UnitTest/{ControlArea}/
find maui/tests/Syncfusion.Maui.Toolkit.UnitTest/{ControlArea}/ -name "*.cs" | head -20

If no test file exists for the control area, create one following the naming pattern of adjacent test files.


Step 2: What to Test

Add tests for all scenarios that are possible given the control's design:

Change TypeWhat to Cover
Bug fixReproduce the bug — must fail without fix, pass with fix
FeatureValidate new behavior end-to-end
Edge casesBoundary values, null inputs where nullable is allowed, default state, repeated calls

Naming convention: MethodOrProperty_Scenario_ExpectedBehavior

[Fact]
public void SomeProperty_WhenSetToValue_ShouldUpdateBehavior()
{
	// Arrange
	var control = new SomeControl();

	// Act
	control.SomeProperty = expectedValue;

	// Assert
	Assert.Equal(expectedValue, control.InternalState);
}

Use hard tabs for indentation. Do NOT use the private keyword.


Step 3: What NOT to Test (Impossible Scenarios)

Do NOT write tests for scenarios that are architecturally impossible.

A scenario is impossible if:

ReasonExample
Type system prevents the stateTesting null on a non-nullable required property
Constructor guarantees initializationTesting "uninitialized" state on a property set in the constructor
Code path can never be reachedA branch guarded by a condition always true/false by design
Platform API unavailable in unit test contextTesting a renderer or native handler requiring a live platform runtime
Contradicts control invariantsSetting an index out of range when the setter clamps to valid range

Step 4: Document Skipped Scenarios

For each impossible scenario, add a row to ## Skipped Tests in the caller's state file (or report directly to the user if invoked standalone):

## Skipped Tests
| Scenario | Reason Impossible |
|----------|-------------------|
| `Items_WhenNull_ShouldNotThrow` | `Items` is initialized in constructor; can never be null |
| `OnPlatformRenderer_WhenDetached` | Requires native platform runtime; not testable in xUnit |

Step 5: Build and Run Tests

# Build first to catch compile errors
dotnet build ./Syncfusion.Maui.Toolkit.sln

# Run all unit tests
dotnet test maui/tests/Syncfusion.Maui.Toolkit.UnitTest/

# Run tests filtered to this control area
dotnet test maui/tests/Syncfusion.Maui.Toolkit.UnitTest/ --filter "FullyQualifiedName~{ControlArea}"

Report results to the caller or user: tests passed ✅, failed ❌, or skipped with reason.

Download now (ZIP)

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. fullstackhero/dotnet-starter-kit★ 6.8ksame name
    2. AsiaOstrich/universal-dev-standards★ 82same name
    3. Hey-Diga/dotclaude★ 17same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.