一键导入
testing
Use when: running or writing unit tests, discovering/filtering private test-framework cases, or fixing Windows DLL/PATH test startup issues.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when: running or writing unit tests, discovering/filtering private test-framework cases, or fixing Windows DLL/PATH test startup issues.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when: generating deployment configs, rendering per-instance scripts, editing Helm values, analyzing install/**/*.tpl Go templates, yaml.tpl/sh.tpl/bat.tpl files, or using atdtool deployment workflows.
Use when: auditing or optimizing AI agent prompts, bridge files, skills, SKILL.md metadata, and cross-tool compatibility.
Use when: writing or reviewing C++/CMake/Markdown code, applying project engineering conventions, checking cpplint, clang-format, cmake-format, cmake-lint, markdownlint, clang-tidy, protobuf, RPC, generated-code, service/component CMake rules.
Use when: working on atgateway v2 protocol code, ECDH handshakes, encryption, compression, reconnection, FlatBuffers schema, or gateway unit tests.
Use when: configuring or building atsf4g-co with CMake, resolving build errors, or adjusting Windows/MSVC/vcpkg and Unix/Linux/macOS build options.
Use when: editing enable_expression config fields, environment-variable expansion syntax, YAML deployment values, or atapp config templates.
| name | testing |
| description | Use when: running or writing unit tests, discovering/filtering private test-framework cases, or fixing Windows DLL/PATH test startup issues. |
This repo uses a private unit testing framework (shared by atframe_utils/libatbus/libatapp).
Most test executables support:
-l / --list-tests-r <group> or -r <group>.<case>-f "pattern*" / --filter "pattern*"-h, -vOn Windows, unit tests/samples can fail to start if dependent DLLs are not found.
Preferred approach: prepend DLL directories to PATH for the current run/debug session.
Typical DLL directories in this repo:
<BUILD_DIR>\publish\bin\<Config> (project DLLs)<REPO_ROOT>\third_party\install\windows-amd64-msvc-19\bin (third-party DLLs when using the bundled cmake-toolset)Example (PowerShell):
$buildDir = "<BUILD_DIR>"
$cfg = "Debug"
$env:PATH = "$buildDir\publish\bin\$cfg;$buildDir\publish\bin;${PWD}\third_party\install\windows-amd64-msvc-19\bin;" + $env:PATH
Set-Location "$buildDir\_deps\atframe_utils\test\$cfg"
./atframe_utils_unit_test.exe -l
Some unit tests (atapp_etcd_cluster, atapp_etcd_module) require a running etcd instance. Use the setup-etcd scripts in atframework/libatapp/ci/etcd/ to download and start a local etcd:
# Linux / macOS
bash atframework/libatapp/ci/etcd/setup-etcd.sh start
export ATAPP_UNIT_TEST_ETCD_HOST="http://127.0.0.1:12379"
# Run etcd-dependent tests, then:
bash atframework/libatapp/ci/etcd/setup-etcd.sh stop
# Windows (PowerShell)
.\atframework\libatapp\ci\etcd\setup-etcd.ps1 -Command start
$env:ATAPP_UNIT_TEST_ETCD_HOST = "http://127.0.0.1:12379"
# Run etcd-dependent tests, then:
.\atframework\libatapp\ci\etcd\setup-etcd.ps1 -Command stop
Commands: download, start, stop, cleanup (stop + delete all), status. Default client port: 12379.
If ATAPP_UNIT_TEST_ETCD_HOST is not set, etcd-dependent tests are skipped (not failed).
If the workspace provides CMake build tasks, prefer those to ensure UTF-8 console output and consistent build directories.