← 返回 Skills 市场
tebjan

Vvvv Testing

作者 Tebjan Halm · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
362
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install vvvv-testing
功能描述
Set up and run automated tests for vvvv gamma packages and C# nodes -- VL.TestFramework with NUnit for library/package authors (CI-ready), test .vl patches w...
使用说明 (SKILL.md)

\r \r

Testing vvvv gamma Projects\r

\r

Two Testing Approaches\r

\r | Approach | Use Case | Setup |\r |----------|----------|-------|\r | VL.TestFramework (NUnit) | Package/library authors, CI integration | .csproj test project with NUnit |\r | Agent test workflow | Quick verification, ad-hoc debugging | Create test .vl patch, launch vvvv, check results |\r \r

VL.TestFramework (NUnit)\r

\r

Test Project Setup\r

\r Create a test .csproj referencing VL.TestFramework:\r \r

\x3CProject Sdk="Microsoft.NET.Sdk">\r
  \x3CPropertyGroup>\r
    \x3CTargetFramework>net8.0-windows\x3C/TargetFramework>\r
  \x3C/PropertyGroup>\r
  \x3CItemGroup>\r
    \x3CPackageReference Include="NUnit" Version="4.*" />\r
    \x3CPackageReference Include="NUnit3TestAdapter" Version="4.*" />\r
    \x3CPackageReference Include="Microsoft.NET.Test.Sdk" Version="17.*" />\r
  \x3C/ItemGroup>\r
  \x3CItemGroup>\r
    \x3CProjectReference Include="..\path	o\VL.TestFramework.csproj" />\r
    \x3C!-- OR if using installed vvvv: -->\r
    \x3C!-- Reference VL.TestFramework.dll from vvvv install dir -->\r
  \x3C/ItemGroup>\r
\x3C/Project>\r
```\r
\r
### Minimal Test Class\r
\r
```csharp\r
using NUnit.Framework;\r
using VL.TestFramework;\r
\r
[TestFixture]\r
public class MyPackageTests\r
{\r
    TestEnvironment testEnvironment;\r
\r
    // Important: Don't use async Task here (NUnit sync context issue)\r
    [OneTimeSetUp]\r
    public void Setup()\r
    {\r
        var assemblyPath = typeof(MyPackageTests).Assembly.Location;\r
        var searchPaths = new[] { "path/to/your/package" };\r
        testEnvironment = TestEnvironmentLoader.Load(assemblyPath, searchPaths);\r
    }\r
\r
    [OneTimeTearDown]\r
    public void TearDown()\r
    {\r
        testEnvironment?.Dispose();\r
        testEnvironment = null;\r
    }\r
\r
    [Test]\r
    public async Task MyPatchCompilesWithoutErrors()\r
    {\r
        await testEnvironment.LoadAndTestAsync("path/to/MyPatch.vl");\r
    }\r
\r
    [Test]\r
    public async Task MyPatchCompilesAndRuns()\r
    {\r
        await testEnvironment.LoadAndTestAsync(\r
            "path/to/MyPatch.vl",\r
            runEntryPoint: true);\r
    }\r
}\r
```\r
\r
### Key API\r
\r
- `TestEnvironmentLoader.Load(assemblyPath, searchPaths)` -- Create test environment. One per test class (expensive).\r
- `testEnvironment.LoadAndTestAsync(filePath)` -- Load .vl document, check for compilation errors.\r
- `testEnvironment.LoadAndTestAsync(filePath, runEntryPoint: true)` -- Also execute the entry point (Create + Update + Dispose).\r
- `testEnvironment.GetPackages()` -- Discover all packages and their source/help/test files.\r
- `testEnvironment.Host.LoadAndCompileAsync(filePath)` -- Load and compile without running (for custom assertions).\r
- `testEnvironment.Host.GetTargetCompilationAsync(filePath)` -- Get the C# compilation for inspection.\r
\r
For the full API reference, see [test-framework-reference.md](test-framework-reference.md).\r
\r
### Test Discovery Conventions\r
\r
The VL.TestFramework automatically discovers tests:\r
\r
- **Test documents**: `.vl` files in `tests/` folders under package directories\r
- **Help patches**: `.vl` files in `help/` folders (tested for compilation only)\r
- **Test nodes**: Process or operation nodes ending in `Test` or `Tests` within test documents are individually compiled and executed\r
\r
File discovery pattern:\r
```\r
VL.MyPackage/\r
  tests/\r
    MyFeatureTest.vl      \x3C-- auto-discovered test document\r
    IntegrationTests.vl   \x3C-- auto-discovered test document\r
  help/\r
    HowTo Use Feature.vl  \x3C-- tested for compilation errors\r
```\r
\r
### Running Tests\r
\r
```shell\r
# Run all tests\r
dotnet test\r
\r
# Run specific test\r
dotnet test --filter "MyPatchCompilesWithoutErrors"\r
\r
# Via Nuke build system (if available)\r
./build.ps1 --target Test\r
```\r
\r
## Test Nodes (VL Patch Assertions)\r
\r
Use these nodes inside .vl test patches to assert behavior. Available under `VL.Lib.Basics.Test.TestNodes`:\r
\r
```csharp\r
// In VL patches, these are available as nodes:\r
TestNodes.Assert(condition, "message")           // General assertion\r
TestNodes.AreEqual(expected, actual)             // Value equality\r
TestNodes.AreNotEqual(expected, actual)          // Value inequality\r
TestNodes.IsNotNull(input)                       // Null check\r
TestNodes.AreSequenceEqual(expected, actual)     // Collection equality\r
TestNodes.AssertElementHasError(elementGuid)     // Verify element has compile error\r
TestNodes.AssertElementHasNoError(elementGuid)   // Verify element has no compile error\r
```\r
\r
Assertions throw `AssertionException` on failure, which the test runner catches and reports.\r
\r
## Agent Test Workflow\r
\r
For quick verification without a full NUnit project:\r
\r
### 1. Create a Test Patch\r
\r
Create a `.vl` file that exercises the feature under test. Include TestNodes for assertions. Name it with a `Test` suffix for auto-discovery. To understand the .vl XML file structure (document hierarchy, element IDs, node references, pins, pads, links), consult the **vvvv-fileformat** skill.\r
\r
### 2. Compile-Check via VL.TestFramework\r
\r
Write a minimal C# script or test that loads and compiles the patch:\r
\r
```csharp\r
var env = TestEnvironmentLoader.Load(assemblyPath, searchPaths);\r
await env.LoadAndTestAsync("path/to/MyTest.vl", runEntryPoint: true);\r
env.Dispose();\r
```\r
\r
### 3. Launch vvvv for Manual Verification\r
\r
Use the **vvvv-debugging** skill to set up a launch configuration that opens the test patch:\r
\r
```shell\r
vvvv.exe --stoppedonstartup --debug --log -o "path/to/MyTest.vl"\r
```\r
\r
- `--stoppedonstartup` pauses runtime so you can inspect initial state\r
- `--log` enables logging to `%USERPROFILE%\Documents\vvvv\gamma\vvvv.log`\r
- Parse the log file for errors after vvvv exits\r
\r
### 4. Check Results\r
\r
After vvvv exits, check:\r
- Exit code (0 = success)\r
- Log file for `ERROR` or `EXCEPTION` entries\r
- Any `AssertionException` in the output\r
\r
## CI Integration\r
\r
### Nuke Build System\r
\r
Most vvvv repos use Nuke. The test target:\r
\r
```csharp\r
Target Test => _ => _\r
    .Executes(() =>\r
    {\r
        DotNetTest(_ => _\r
            .SetProjectFile(Solution)\r
            .SetConfiguration(Configuration));\r
    });\r
```\r
\r
Run with: `./build.ps1` or `./build.sh` (defaults to Publish target; use `--target Test` for tests).\r
\r
### GitHub Actions Example\r
\r
```yaml\r
- name: Run vvvv tests\r
  run: dotnet test --configuration Release --logger "trx"\r
```\r
\r
### Performance Notes\r
\r
- Create one `TestEnvironment` per test class (`[OneTimeSetUp]`), not per test\r
- Documents are unloaded after each test to free memory\r
- Use `preCompilePackages: false` (default) for faster test iteration\r
- Set `preCompilePackages: true` for production-fidelity testing\r
安全使用建议
This skill is coherent for its stated purpose, but be aware: running the described tests (especially with runEntryPoint:true) will execute code from your repository and can run arbitrary user code. Before using in CI or allowing an agent to run tests autonomously, (1) run tests in an isolated environment (container or restricted CI runner), (2) review tests and any referenced assemblies for untrusted actions, and (3) ensure the vvvv installation location and repository paths the skill will enumerate are the intended ones. If you let an autonomous agent invoke this skill, restrict the agent's filesystem access to the repository under test.
功能分析
Type: OpenClaw Skill Name: vvvv-testing Version: 1.0.0 The skill bundle provides comprehensive documentation and code templates for testing vvvv gamma projects using NUnit and the VL.TestFramework. It includes standard C# testing patterns, XML project configurations, and instructions for running tests via CLI or CI/CD. No malicious behavior, data exfiltration, or suspicious instructions were identified in SKILL.md or test-framework-reference.md.
能力评估
Purpose & Capability
Name/description describe setting up and running VL.TestFramework/NUnit and lightweight agent-driven tests; the SKILL.md content only describes creating test projects, discovering .vl files, walking repo directories, and running/compiling tests — all expected for a test framework helper.
Instruction Scope
Instructions include filesystem operations (walking up to find .git, enumerating package folders, reading .vl files, loading assemblies) and executing tests/entry points. This is appropriate for test discovery/runtime, but running tests will execute user code — the agent will need repository access and may invoke compiled code when runEntryPoint:true is used.
Install Mechanism
No install spec and no code files (instruction-only). Nothing is downloaded or written to disk by the skill itself, so install risk is minimal.
Credentials
The skill declares no environment variables, credentials, or config paths. The instructions reference local paths and vvvv installation location which are reasonable and proportional to its purpose.
Persistence & Privilege
always:false and default invocation behavior. The skill does not request persistent or elevated platform privileges and does not modify other skills or system-wide agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install vvvv-testing
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /vvvv-testing 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
vvvv-testing 1.0.0 - Initial release: Add VL.TestFramework-based automated testing for vvvv gamma packages and C# nodes. - Supports two workflows: NUnit-based CI-ready projects and lightweight agent/manual test patch validation. - Includes test discovery conventions for `.vl` documents in `tests/` and `help/` folders. - Provides detailed setup instructions, example test classes, and key API usage for VL.TestFramework. - Documents test assertion nodes for VL patches and integration steps for CI/CD workflows (including Nuke and GitHub Actions). - Performance and practical guidance for efficient test environment usage.
元数据
Slug vvvv-testing
版本 1.0.0
许可证
累计安装 2
当前安装数 2
历史版本数 1
常见问题

Vvvv Testing 是什么?

Set up and run automated tests for vvvv gamma packages and C# nodes -- VL.TestFramework with NUnit for library/package authors (CI-ready), test .vl patches w... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 362 次。

如何安装 Vvvv Testing?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install vvvv-testing」即可一键安装,无需额外配置。

Vvvv Testing 是免费的吗?

是的,Vvvv Testing 完全免费(开源免费),可自由下载、安装和使用。

Vvvv Testing 支持哪些平台?

Vvvv Testing 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Vvvv Testing?

由 Tebjan Halm(@tebjan)开发并维护,当前版本 v1.0.0。

💬 留言讨论