azure/create-recorded-test
Generate a new recorded integration test
npx skills add https://github.com/Azure/azure-sdk-for-rust --skill create-recorded-test
You will generate one or more recorded integration tests under the sdk/{service-directory}/{crate-name}/tests directory in ${input:testFile:test_file}.rs where:
{repo-root} is the root directory containing Cargo.toml.{service-directory} is the directory name under sdk for the current ${file} e.g., keyvault.{crate-name} is the crate directory name under sdk/{service-directory} for the current ${file} e.g., azure_security_keyvault_secrets.These instructions only need to be done once. If changes described are already present, do not make the changes again.
sdk/{service-directory}/{crate-name}/tests directory. Do not add recorded tests to src/, examples/, or README.md. {repo-root}/eng/common/TestResources/New-TestResources.ps1 -ServiceDirectory {service-directory}
test-proxy push -a sdk/{service-directory}/assets.json.For each new recorded test:
sdk/{service-directory}/{crate-name}/tests/${input:testFile}.rs, add or update async integration tests attributed with #[recorded::test].async fn ${input:testName}(ctx: TestContext) -> Result<()>.let recording = ctx.recording();let mut options = {Client}Options::default();recording.instrument(&mut options.client_options);recording.var("{ENV_VAR}", None).as_str(), recording.credential(), and Some(options).TestContext, and required ClientOptions instrumentation.#[recorded::test] functions. AZURE_TEST_MODE=record cargo test -p {crate-name} --test ${input:testFile}
cargo test -p {crate-name} --test ${input:testFile}
test-proxy is already installed and available: test-proxy push -a sdk/{service-directory}/assets.json
{repo-root}/eng/common/TestResources/Remove-TestResources.ps1 -ServiceDirectory {service-directory}
Take azure/create-recorded-test from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.