TE

testing-standards

Maintains uniform testing conventions and patterns for the Stock Indicators project.

Install

mkdir -p .claude/skills/testing-standards && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6920" && unzip -o skill.zip -d .claude/skills/testing-standards && rm skill.zip

Installs to .claude/skills/testing-standards

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Testing conventions for Stock Indicators. Use for test naming (MethodName_StateUnderTest_ExpectedBehavior), FluentAssertions patterns, precision requirements, and test base class selection.
189 chars✓ has a “when” trigger
Beginner

Key capabilities

  • →Enforce test naming conventions
  • →Standardize base class selection
  • →Validate required abstract test methods
  • →Ensure consistent test data usage

How it works

The skill provides a set of rules for test naming, base class selection, and required method implementation, ensuring all tests follow the project's established architecture.

Inputs & outputs

You give it
Test code or test class structure
You get back
Validation of test standards compliance

When to use testing-standards

  • →Standardizing new test code
  • →Reviewing test naming and structure
  • →Checking base class usage in tests

About this skill

Testing standards

Tests use MSTest with AwesomeAssertions. Base classes and test interfaces live in tests/Library/TestBase/; assertion helpers live in tests/Library/TestTools/TestAssert.cs.

Load required test methods and precision constants before writing a new test class or picking a Money* tolerance.

Base class per test file

Test fileNamespaceBase classTest interfaces
{Name}SeriesTests.csStaticSeriesStaticSeriesTestBasenone
{Name}BufferListTests.csBufferListsBufferListTestBaseITestChainBufferList or ITestBarBufferList, plus ITestCustomBufferListCache for a custom cache
{Name}HubTests.csStreamHubsStreamHubTestBaseITestChainObserver or ITestBarObserver, plus ITestChainProvider when the hub feeds other hubs
{Name}RegressionTests.csRegressionRegressionTestBase<TResult>none
{Name}CatalogTests.csCataloggingTestBasenone

StaticSeriesTestBase and StreamHubTestBase derive from TestBaseWithPrecision, which supplies the Money* constants. BufferListTestBase and RegressionTestBase<TResult> derive from TestBase and do not.

Naming

Name every test method MethodName_StateUnderTest_ExpectedBehavior, for example Exceptions_InvalidLookback_ThrowsArgumentOutOfRangeException.

Fixtures

Use the static bar sets on TestBase instead of loading data: Bars (the 502-bar default set from Data.GetDefault()), BadBars, Nobars, Onebar, OtherBars, BigBars, LongishBars, ZeroesBars, and others. StreamHubTestBase.RevisedBars is Bars with index 495 removed, for late-arrival and removal tests.

Assertions

  • Assert style parity with actuals.IsExactly(expected), which compares every member in strict order. Never assert parity with Should().Be() or a bare BeEquivalentTo().
  • Assert manually calculated spot values with BeApproximately(expected, Money4) or the tightest Money* constant the reference data supports.
  • Assert a bounded indicator's documented range with sut.IsBetween(static x => x.WilliamsR, -100, 0), which skips null and NaN values.
  • Assert exceptions with FluentActions.Invoking(() => ...).Should().ThrowExactly<ArgumentOutOfRangeException>().

Running

Unit runs use tests/tests.unit.runsettings, which excludes the Regression and Integration categories. Run regression tests with --settings tests/tests.regression.runsettings. The code-completion skill owns the full quality-gate commands and VS Code task names.

Do not do these

  • Do not widen a Money* tolerance to absorb floating-point drift between styles; parity is IsExactly, and a mismatch is a bug.
  • Do not edit a *.standard.json regression baseline by hand; regenerate it with dotnet run --project tools/baselining -- --indicator {UIID} after an intended calculation change.
  • Do not skip a required abstract or interface method by omitting the interface; every new test class declares the interfaces for its style.

When not to use it

  • →When writing tests for projects outside of Stock Indicators
  • →When the testing framework does not support the specified base classes

Prerequisites

FluentAssertions library

Limitations

  • →Strictly tied to Stock Indicators project conventions
  • →Requires adherence to specific base classes

How it compares

It provides a centralized standard for test structure, replacing inconsistent manual testing patterns with a unified convention.

Compared to similar skills

testing-standards side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
testing-standards (this skill)15moNo flagsBeginner
tdd-workflow67moReviewIntermediate
qlty-check510moReviewBeginner
superpowers-tdd510moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry