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.zipInstalls 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.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
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 file | Namespace | Base class | Test interfaces |
|---|---|---|---|
{Name}SeriesTests.cs | StaticSeries | StaticSeriesTestBase | none |
{Name}BufferListTests.cs | BufferLists | BufferListTestBase | ITestChainBufferList or ITestBarBufferList, plus ITestCustomBufferListCache for a custom cache |
{Name}HubTests.cs | StreamHubs | StreamHubTestBase | ITestChainObserver or ITestBarObserver, plus ITestChainProvider when the hub feeds other hubs |
{Name}RegressionTests.cs | Regression | RegressionTestBase<TResult> | none |
{Name}CatalogTests.cs | Catalogging | TestBase | none |
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 withShould().Be()or a bareBeEquivalentTo(). - Assert manually calculated spot values with
BeApproximately(expected, Money4)or the tightestMoney*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 isIsExactly, and a mismatch is a bug. - Do not edit a
*.standard.jsonregression baseline by hand; regenerate it withdotnet 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
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| testing-standards (this skill) | 1 | 5mo | No flags | Beginner |
| tdd-workflow | 6 | 7mo | Review | Intermediate |
| qlty-check | 5 | 10mo | Review | Beginner |
| superpowers-tdd | 5 | 10mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by DaveSkender
View all by DaveSkender →You might also like
tdd-workflow
affaan-m
在编写新功能、修复错误或重构代码时使用此技能。强制执行测试驱动开发,包含单元测试、集成测试和端到端测试,覆盖率超过80%。
qlty-check
parcadei
Code quality checks, formatting, and metrics via qlty CLI
superpowers-tdd
anthonylee991
Applies tests-first discipline (red/green/refactor) and adds regression tests for bugs. Use when implementing features, fixing bugs, or refactoring.
solid
ramziddin
Use this skill when writing code, implementing features, refactoring, planning architecture, designing systems, reviewing code, or debugging. This skill transforms junior-level code into senior-engineer quality software through SOLID principles, TDD, clean code practices, and professional software design.
bunit-test-migration
FritzAndFriends
Migrate bUnit test files from deprecated beta API (1.0.0-beta-10) to bUnit 2.x stable API. Use this when working on .razor test files in BlazorWebFormsComponents.Test that contain old patterns like TestComponentBase, Fixture, or SnapshotTest.
code-refactor
luongnv89
Systematic code refactoring based on Martin Fowler's methodology. Use when users ask to refactor code, improve code structure, reduce technical debt, clean up legacy code, eliminate code smells, or improve code maintainability. This skill guides through a phased approach with research, planning, and safe incremental implementation.