AGENT SKILL

基于示例生成测试用例

author-test

根据给定示例生成测试。参数:<cs_root> C# SDK 仓库根目录;<package_name> 包名:Azure.AI.Projects、Azure.AI.Projects.Agents 或 Azure.AI.Extensions.OpenAI 之一;<sample_name> 用作测试起点的示例。

适用职业测试工程师
License 许可
MIT
最近更新
2026-11-14
Stars
★ 6.1k
Forks
5.2k

01 前言 Front Matter

name
author-test
description
Generate a test given sample. Parameters: <cs_root> C# SDK repository root; <package_name> Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; <sample_name> the sample to use as a starting point for the test.

02 资源文件 44

03 SKILL.md 正文

Basic information.

This skill requires C# repository root (<cs_root>), package name (<package_name>), and sample file name as an input (<sample_name>). The samples are located in the <cs_root>/sdk/ai/<package_name>/tests/Samples directory, the test files are in <cs_root>/sdk/ai/<package_name>/tests. The tests are organized according to scenarios tested. The files, having suffix Base contains the required utility functions needed for testing.

Task

Look at the sample and generate the test code in the appropriate test file. The test must have the next structure:

[RecordedTest]
// Test cases if any [TestCase(true)]
public async Task TestFeatureName(){
    var result = await CallFeatureAsync();
    Assert.That(result.Value, Is.Equal.To("Expected feature value"))
}

Always use the async methods (with Async suffix) if possible. Keep the test short and representative. To make sure that the test is running as expected, build the project.

cd <cs_root>
dotnet build
cd <cs_root>
dotnet build

If the project does not build, iterate on the error.

04 同仓库更多 Skills

Azure
Azure/azure-sdk-for-net

WebPubSub Chat API 基线维护

update-chat-api

使用场景:在公共 API 发生变更后,更新、导出、刷新或验证 Azure.Messaging.WebPubSub.Chat 的公共 API 基线。

软件开发工程师代码实现
★ 6.1k
Azure
Azure/azure-sdk-for-net

Azure 搜索文档 SDK 端到端工作流

search-documents

Azure.Search.Documents SDK 的端到端(E2E)工作流技能(TypeSpec + 大量定制)。处理完整发布周期和部分更新:SHA 更新;代码生成;构建;定制修复;ServiceVersion 同步;测试;API 导出;变更日志;版本;示例;格式化;发布元数据。使用场景:为 Azure.Search.Documents 创建新包版本;重新生成 Azure.Search.Documents;修复 Azure.Search.Documents 错误;发布 Azure.Search.Documents;更新 Azure.Search.Documents 规范。不适用于 Azure.ResourceManager.Search 或 Azure.Provisioning.Search。

软件开发工程师Microsoft 应用生命周期管理
★ 6.1k
Azure
Azure/azure-sdk-for-net

Search.Documents 版本差异检测

search-documents-version-diff

将当前 Azure.Search.Documents 公共 API 接口与之前发布的版本进行对比,检测因 TypeSpec 变更后 SDK 自定义层未向上传播而导致的预览版之间的回归。当用户要求比较 Azure.Search.Documents 各 beta 版本、确认 Azure.Search.Documents 预览功能未丢失、审计 Azure.Search.Documents 各版本间的回归、对 Azure.Search.Documents 发布分支进行健全性检查,或排查 Azure.Search.Documents 预览功能缺失时使用——即使用户没有提到“diff”一词。专门捕获丢失的包装器(QueryAnswer/QueryCaption/QueryRewrites 类型)、丢失的 SearchOptions 聚合重定向器、`@@access("internal")` 翻转、被直接删除而非通过条件门控的 `#if AZURE_SEARCH_PREVIEW` 代码块、丢失的 `ServiceVersion` 枚举值,以及便捷方法降级为协议方法等问题。

软件开发工程师测试与质量保障
★ 6.1k
Azure
Azure/azure-sdk-for-net

Search.Documents TypeSpec 一致性验证

search-documents-typespec-validation

面向 Azure.Search.Documents SDK 的 TypeSpec 验证技能。针对任意固定 commit 的 TypeSpec 定义,对全部操作、全部模型、全部枚举和全部属性执行完整验证。适用于任何 API 版本。生成完整的差距报告:缺失功能、多余功能、命名不匹配以及建议的修复位置。适用场景:“根据 TypeSpec 验证 Azure.Search.Documents SDK”、“检测 Azure.Search.Documents TypeSpec 功能差距”、“Azure.Search.Documents SDK 缺少哪些功能”、“将 Azure.Search.Documents SDK 与规范对比”、“对 Azure.Search.Documents 进行完整的规范覆盖审计”。请勿用于版本间差异对比或回归检测——此类情况请使用 search-documents-version-diff。

软件开发工程师测试与质量保障
★ 6.1k
Azure
Azure/azure-sdk-for-net

掷骰子技能文件测试

test-skill_file

使用随机数生成器掷骰子。

普通用户抽奖活动与随机抽取
★ 6.1k
Azure
Azure/azure-sdk-for-net

随机数掷骰子

roll-dice

使用随机数生成器掷骰子。当用户要求掷单个骰子(d6、d20 等)、掷骰子或生成随机掷骰结果时使用。

普通用户抽奖活动与随机抽取
★ 6.1k