[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AC7FABB3WTZ91NP57KV2HP":3,"skill-same:01M6AC7FABB3WTZ91NP57KV2HP":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":26,"linkOnly":27,"markdownContent":28,"markdownBody":29,"frontMatter":30,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":36,"ownerHtmlUrl":37,"ownerBlogUrl":38,"ownerDescription":6,"updatedAt":39,"install":40,"resources":53},"01M6AC7FABB3WTZ91NP57KV2HP","running-tests",null,"Guide for running tests in the openai-dotnet repository. Use this when asked to run, debug, or validate tests, or when writing new tests. Explains test modes (Playback, Record, Live), how to identify recorded vs non-recorded tests, environment variable configuration, and what to do when recordings are missing or stale.","openai\u002Fopenai-dotnet","openai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F14957082?v=4","01M6AC29YGCR4S2NTJFV0G8B81","OpenAI","01M6AC79YSNZGHBYPXJ2REEQK1",2719,"MIT","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-dotnet\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Frunning-tests\u002FSKILL.md",[],[19,20,21,22,23,24,25,9],"running tests","writing","test","dotnet","validate","debug","run","2026-11-10 10:12:30",false,"---\nname: running-tests\ndescription: Guide for running tests in the openai-dotnet repository. Use this when asked to run, debug, or validate tests, or when writing new tests. Explains test modes (Playback, Record, Live), how to identify recorded vs non-recorded tests, environment variable configuration, and what to do when recordings are missing or stale.\n---\n\n# Running Tests\n\n## Overview\n\nTests in this repository use the [Microsoft.ClientModel.TestFramework](https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-net\u002Fblob\u002Fmain\u002Fsdk\u002Fcore\u002FMicrosoft.ClientModel.TestFramework\u002FREADME.md) and NUnit.\n\nMany tests rely on **session recordings** — pre-recorded HTTP interactions stored in `tests\u002FSessionRecords\u002F` — so they can run without live service access. The repository defaults to `Playback` mode unless overridden in the environment.\n\n## Test Modes\n\n| Mode | Description |\n|------|-------------|\n| **Playback** | Tests run against pre-recorded session data in `tests\u002FSessionRecords\u002F`. No API key is required. |\n| **Record** | Tests run against the live OpenAI API and produce or update session recordings. Requires an API key. |\n| **Live** | Tests run against the live OpenAI API without producing or updating session recordings. Requires an API key. |\n\nThe mode is controlled by the `CLIENTMODEL_TEST_MODE` environment variable and accepts `Playback`, `Record`, or `Live`.\n\nIn Playback mode, the framework may attempt to auto-record when a session recording is missing or stale. Disable that behavior by explicitly setting `CLIENTMODEL_DISABLE_AUTO_RECORDING` to `true`.\n\n## Agent Rules\n\nAs the agent, only execute tests in `Playback` mode.\n\nDo not run `Record` or `Live` mode yourself. Those paths require live credentials which you do not have.\n\nBefore running tests, always set:\n\n```powershell\n$env:CLIENTMODEL_TEST_MODE = \"Playback\"\n$env:CLIENTMODEL_DISABLE_AUTO_RECORDING = \"true\"\n```\n\nIf a recorded test needs new recordings or updated recordings, you must follow the instructions below to ask a human to capture them for you instead of trying to capture them yourself.\n\n## Identifying Recorded Tests vs Non-Recorded Tests\n\nTreat these as practical indicators instead of a rigid checklist.\n\n### Strong signals that a test is a recorded test:\n\n- The test class inherits from `OpenAIRecordedTestBase`.\n- The test method uses `[RecordedTest]`.\n- The test gets clients through `GetProxiedOpenAIClient`.\n- The test exercises real service behavior rather than mocked responses.\n\n### Strong signals that a test is not a recorded test:\n\n- The test class inherits from something other than `OpenAIRecordedTestBase` or has no base class.\n- The test method uses plain `[Test]` instead of `[RecordedTest]`.\n- The test uses mocked transports or handcrafted responses to simulate HTTP responses, such as `MockPipelineTransport`, `MockPipelineResponse`, or `GetClientOptionsWithMockResponse`.\n- The test does not need to reach a live cloud service.\n\n## When Recordings Are Missing or Stale\n\nRecordings must be captured by a human.\n\nRequest recordings from a human before considering your work complete in either of the following cases:\n\n1. You added a new recorded test (which implies its recording is missing because it has never been recorded before).\n2. An existing recorded test fails in Playback mode because its recording is missing or stale (for example, if the recorded test was modified and the existing recording no longer matches).\n\nWhen asking for recordings, always provide:\n\n1. The link to the recording workflow\n2. The exact `NUnit.Where` expression\n3. A copy-pasteable `dotnet test` command\n\nYou must use this template:\n\n> Please record tests using the recording workflow:\n> https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-dotnet\u002Factions\u002Fworkflows\u002Frecord-test.yml\n>\n> Use the following `NUnit.Where` expression:\n> ```text\n> test == 'Namespace.TestClass.TestMethodName'\n> ```\n>\n> Alternatively, run the following command locally and push the recordings manually:\n> ```powershell\n> dotnet test .\u002Ftests\u002FOpenAI.Tests.csproj --configuration Release --framework \"net10.0\" -- NUnit.Where=\"test == 'Namespace.TestClass.TestMethodName'\"\n> ```\n\nUse `NUnit.Where` for recording requests even when `dotnet test --filter` would work locally. `NUnit.Where` is the contract used by the recording workflow. Prefer `test == ...` because it matches the exact discovered NUnit test name and avoids ambiguity. For NUnit fixture-parameterized tests such as classes constructed with `bool isAsync`, the discovered test names may include fixture arguments like `(True)` or `(False)`.\n\nFor a single ordinary test, use:\n\n```text\ntest == 'Namespace.TestClass.TestMethodName'\n```\n\nIf you need one exact fixture instance, use:\n\n```text\ntest == 'Namespace.TestClass(True).TestMethodName'\n```\n\nExample for async fixture instance of the `GenerateSingleEmbedding` recorded test:\n\n```text\ntest == 'OpenAI.Tests.Embeddings.EmbeddingsTests(True).GenerateSingleEmbedding'\n```\n\nIf multiple tests need recording, combine them in a single `NUnit.Where` expression:\n\n```text\n(test == 'Namespace.TestClass.TestA') or (test == 'Namespace.TestClass.TestB')\n```\n\nExample for both fixture instances of the `GenerateSingleEmbedding` recorded test:\n\n```text\n(test == 'OpenAI.Tests.Embeddings.EmbeddingsTests(True).GenerateSingleEmbedding') or (test == 'OpenAI.Tests.Embeddings.EmbeddingsTests(False).GenerateSingleEmbedding')\n```\n","# Running Tests\n\n## Overview\n\nTests in this repository use the [Microsoft.ClientModel.TestFramework](https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-net\u002Fblob\u002Fmain\u002Fsdk\u002Fcore\u002FMicrosoft.ClientModel.TestFramework\u002FREADME.md) and NUnit.\n\nMany tests rely on **session recordings** — pre-recorded HTTP interactions stored in `tests\u002FSessionRecords\u002F` — so they can run without live service access. The repository defaults to `Playback` mode unless overridden in the environment.\n\n## Test Modes\n\n| Mode | Description |\n|------|-------------|\n| **Playback** | Tests run against pre-recorded session data in `tests\u002FSessionRecords\u002F`. No API key is required. |\n| **Record** | Tests run against the live OpenAI API and produce or update session recordings. Requires an API key. |\n| **Live** | Tests run against the live OpenAI API without producing or updating session recordings. Requires an API key. |\n\nThe mode is controlled by the `CLIENTMODEL_TEST_MODE` environment variable and accepts `Playback`, `Record`, or `Live`.\n\nIn Playback mode, the framework may attempt to auto-record when a session recording is missing or stale. Disable that behavior by explicitly setting `CLIENTMODEL_DISABLE_AUTO_RECORDING` to `true`.\n\n## Agent Rules\n\nAs the agent, only execute tests in `Playback` mode.\n\nDo not run `Record` or `Live` mode yourself. Those paths require live credentials which you do not have.\n\nBefore running tests, always set:\n\n```powershell\n$env:CLIENTMODEL_TEST_MODE = \"Playback\"\n$env:CLIENTMODEL_DISABLE_AUTO_RECORDING = \"true\"\n```\n\nIf a recorded test needs new recordings or updated recordings, you must follow the instructions below to ask a human to capture them for you instead of trying to capture them yourself.\n\n## Identifying Recorded Tests vs Non-Recorded Tests\n\nTreat these as practical indicators instead of a rigid checklist.\n\n### Strong signals that a test is a recorded test:\n\n- The test class inherits from `OpenAIRecordedTestBase`.\n- The test method uses `[RecordedTest]`.\n- The test gets clients through `GetProxiedOpenAIClient`.\n- The test exercises real service behavior rather than mocked responses.\n\n### Strong signals that a test is not a recorded test:\n\n- The test class inherits from something other than `OpenAIRecordedTestBase` or has no base class.\n- The test method uses plain `[Test]` instead of `[RecordedTest]`.\n- The test uses mocked transports or handcrafted responses to simulate HTTP responses, such as `MockPipelineTransport`, `MockPipelineResponse`, or `GetClientOptionsWithMockResponse`.\n- The test does not need to reach a live cloud service.\n\n## When Recordings Are Missing or Stale\n\nRecordings must be captured by a human.\n\nRequest recordings from a human before considering your work complete in either of the following cases:\n\n1. You added a new recorded test (which implies its recording is missing because it has never been recorded before).\n2. An existing recorded test fails in Playback mode because its recording is missing or stale (for example, if the recorded test was modified and the existing recording no longer matches).\n\nWhen asking for recordings, always provide:\n\n1. The link to the recording workflow\n2. The exact `NUnit.Where` expression\n3. A copy-pasteable `dotnet test` command\n\nYou must use this template:\n\n> Please record tests using the recording workflow:\n> https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-dotnet\u002Factions\u002Fworkflows\u002Frecord-test.yml\n>\n> Use the following `NUnit.Where` expression:\n> ```text\n> test == 'Namespace.TestClass.TestMethodName'\n> ```\n>\n> Alternatively, run the following command locally and push the recordings manually:\n> ```powershell\n> dotnet test .\u002Ftests\u002FOpenAI.Tests.csproj --configuration Release --framework \"net10.0\" -- NUnit.Where=\"test == 'Namespace.TestClass.TestMethodName'\"\n> ```\n\nUse `NUnit.Where` for recording requests even when `dotnet test --filter` would work locally. `NUnit.Where` is the contract used by the recording workflow. Prefer `test == ...` because it matches the exact discovered NUnit test name and avoids ambiguity. For NUnit fixture-parameterized tests such as classes constructed with `bool isAsync`, the discovered test names may include fixture arguments like `(True)` or `(False)`.\n\nFor a single ordinary test, use:\n\n```text\ntest == 'Namespace.TestClass.TestMethodName'\n```\n\nIf you need one exact fixture instance, use:\n\n```text\ntest == 'Namespace.TestClass(True).TestMethodName'\n```\n\nExample for async fixture instance of the `GenerateSingleEmbedding` recorded test:\n\n```text\ntest == 'OpenAI.Tests.Embeddings.EmbeddingsTests(True).GenerateSingleEmbedding'\n```\n\nIf multiple tests need recording, combine them in a single `NUnit.Where` expression:\n\n```text\n(test == 'Namespace.TestClass.TestA') or (test == 'Namespace.TestClass.TestB')\n```\n\nExample for both fixture instances of the `GenerateSingleEmbedding` recorded test:\n\n```text\n(test == 'OpenAI.Tests.Embeddings.EmbeddingsTests(True).GenerateSingleEmbedding') or (test == 'OpenAI.Tests.Embeddings.EmbeddingsTests(False).GenerateSingleEmbedding')\n```\n",{"name":5,"description":7},"main","c5a939a56a1c5a44ee80fca4680564e76973d8c1",".github\u002Fskills\u002Frunning-tests",431,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-dotnet","https:\u002F\u002Fwww.nuget.org\u002Fpackages\u002FOpenAI","https:\u002F\u002Fgithub.com\u002Fopenai","https:\u002F\u002Fopenai.com\u002F","2026-11-13 02:57:43",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add openai\u002Fopenai-dotnet --skill running-tests",{"tool":46,"command":47},"bunx","bunx skills add openai\u002Fopenai-dotnet --skill running-tests",{"tool":49,"command":50},"pnpm","pnpm dlx skills add openai\u002Fopenai-dotnet --skill running-tests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-dotnet\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Frunning-tests\u002FSKILL.md",true,[54,60,64,68,72],{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Faot-and-startup.md","REFERENCE","参考文档",5475,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fjava-springboot\u002Freferences\u002Faot-and-startup.md",{"path":61,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fconfiguration.md",5146,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fjava-springboot\u002Freferences\u002Fconfiguration.md",{"path":65,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fdata.md",6013,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fjava-springboot\u002Freferences\u002Fdata.md",{"path":69,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fmessaging-caching.md",7391,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fjava-springboot\u002Freferences\u002Fmessaging-caching.md",{"path":73,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Frest-api.md",9174,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fjava-springboot\u002Freferences\u002Frest-api.md",[77],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":26},"01M6AC7D6V6V4B5AFFDJATW5SQ","ingesting-spec","Guide for ingesting the latest OpenAI TypeSpec specification into the openai-dotnet SDK. Use this when asked to update or ingest OpenAI API specs, copy base TypeSpec files from upstream, fix client TSP compile errors, or run code generation for new API areas.","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-dotnet\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fingesting-spec\u002FSKILL.md",[],[84,85,86,22,87,25,88,89,9,90],"spec","ingesting spec","sdk","typespec","update","code","openai api"]