Skip to main content

dynamo-unit-testing

Write comprehensive NUnit tests for the Dynamo codebase following Dynamo testing patterns, conventions, and architectural constraints. Use this skill when writing test methods, test classes, setting up test infrastructure, mocking dependencies, testing with .dyn files, or reviewing test code in Dynamo.

跳到安装

来源信息

仓库
DynamoDS/Dynamo
最近来源活动
2026年5月19日 16:01
检测到的 SKILL.md 语言
英语
星标
2,024
分支
679

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
3 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
dynamo-unit-testing
description
Write comprehensive NUnit tests for the Dynamo codebase following Dynamo testing patterns, conventions, and architectural constraints. Use this skill when writing test methods, test classes, setting up test infrastructure, mocking dependencies, testing with .dyn files, or reviewing test code in Dynamo.
# Dynamo Unit Testing ## When to use - Writing new test methods or test classes for Dynamo components - Setting up test infrastructure (base classes, setup/teardown) - Testing nodes, workspaces, or UI components - Working with .dyn test files or sample graphs - Reviewing existing tests for quality and patterns - Debugging test failures or flaky tests ## When not to use - General coding questions -- use dynamo-dotnet-expert instead - Architecture questions -- use dynamo-onboarding instead - PR descriptions -- use dynamo-pr-description instead ## Inputs expected Test requirements, failing functionality to test, existing code to cover, or test code to review. ## Output format Complete test classes with proper setup, test methods using Dynamo patterns, and explanations of testing approach. --- ## Workflow > 🚀 **Quick Start**: [test-patterns.md](./assets/test-patterns.md) has ready-to-use templates ### 1. Choose Your Base Class Select the appropriate test base class based on what you're testing: - **UnitTestBase** - Utilities, algorithms, no Dynamo model needed - **DynamoModelTestBase** - Nodes, workspaces, commands (most common) - **DSEvaluationUnitTestBase** - DesignScript expression evaluation ### 2. Apply Testing Standards - [Dynamo Coding Standards](https://github.com/DynamoDS/Dynamo/wiki/Coding-Standards) - [Dynamo Naming Standards](https://github.com/DynamoDS/Dynamo/wiki/Naming-Standards) ### 3. Write Focused Tests One behavior per test, descriptive names, Arrange-Act-Assert structure. ## Testing Principles - **NUnit only** - Use NUnit framework exclusively (never xUnit/MSTest) - **One behavior per test** - Each test validates exactly one scenario - **Pragmatic .dyn testing** - .dyn file tests allowed in unit categories for focused functionality ## Documentation **Assets & References:** - **[test-patterns.md](./assets/test-patterns.md)** - Base classes, code templates, common scenarios, complete examples - **[quality-checklist.md](./references/quality-checklist.md)** - Quality guidelines, anti-patterns, best practices **Related Skills:** - dynamo-dotnet-expert - dynamo-onboarding
在 GitHub 查看