azure/azsdk-common-live-and-recorded-tests
Deploy test resources and run Azure SDK tests in live, record, or playback mode. WHEN: \"run live tests\", \"run recorded tests\", \"deploy test resources\", \"record tests\", \"run tests in record mode\", \"clean up test resources\", \"run tests against live resources\". DO NOT USE FOR: writing new tests, authoring Bicep templates, playback-only test runs without resource deployment. INVOKES: azure-sdk-mcp:azsdk_package_run_tests.
npx skills add https://github.com/Azure/azure-sdk-tools --skill azsdk-common-live-and-recorded-tests
| Tool | Purpose |
|------|---------|
| azure-sdk-mcp:azsdk_package_run_tests | Run tests in playback, record, or live mode |
> IMPORTANT: ALWAYS use the azure-sdk-mcp:azsdk_package_run_tests MCP tool to run tests. NEVER run test commands directly in the terminal (e.g., pytest, dotnet test, mvn test, npm test, go test). The MCP tool handles test mode configuration, environment setup, and automatic asset pushing in record mode.
Az) must be installed. If Get-AzContext fails with a command-not-found error, instruct the user to install it with Install-Module Az -Scope CurrentUser -Force.keyvault, storage). This is required by the test resource deployment script..env file at either the service directory level (next to test-resources.bicep, e.g. sdk/storage/.env) or at the package level (e.g. sdk/storage/storage-blob/.env). If one exists, inform the user that a previous deployment appears to be available and ask whether to reuse the existing deployment or redeploy test resources. If reusing, skip to step 7.Get-AzContext to check for an active Azure PowerShell session. If the command fails because the Az module is not installed, instruct the user to run Install-Module Az -Scope CurrentUser -Force first. If no context exists, guide the user through Connect-AzAccount -TenantId [TME tenant ID]. If Connect-AzAccount appears to hang and no browser window opens for authentication, tell the user to copy and paste the command into a new PowerShell window. Confirm the correct subscription is selected..env file is found, confirm with the user before proceeding to deploy test resources. Deployment creates Azure resources that may incur costs.eng/common/TestResources/New-TestResources.ps1 with the service directory, tenant ID, subscription ID, and any user-provided parameters. Use the TME tenant ID and subscription ID if one has not already been provided. See deployment parameters for details. The script outputs environment variables needed for live/record test runs..env file, note its path. Otherwise, collect the environment variables from the script output. In azure-sdk-for-net, if the script outputs a file like test-resources.bicep.env instead of a .env file, move on to step 7 and call the MCP tool WITHOUT passing an env filepath. The test framework will automatically find and handle this special file type.azure-sdk-mcp:azsdk_package_run_tests MCP tool (do NOT run test commands directly in the terminal). Provide the appropriate test mode (record, live, or playback) and the path to the .env file containing test environment variables. When tests run in record mode and all tests pass, the tool automatically pushes recorded test assets to the assets repo.eng/common/TestResources/Remove-TestResources.ps1. If no, inform the user that resources remain deployed for subsequent test runs. See cleanup details.Connect-AzAccount and select the target subscription with Set-AzContext -SubscriptionId <id>. If the browser window for authentication fails to open and the command appears to hang, tell the user to copy and paste the Connect-AzAccount command into a new PowerShell window and run it there instead.Get-AzContext fails with a command-not-found error, the Azure PowerShell module is not installed. Instruct the user to run Install-Module Az -Scope CurrentUser -Force and then retry.Get-AzContext output.Remove-TestResources.ps1 first, or use a different BaseName..env file path is correct.Take azure/azsdk-common-live-and-recorded-tests 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.