azure-functions-tests
БесплатноБез исполняемых скриптовНе проверенUse when Azure Functions need testing before deploy: running them locally with Core Tools v4 and Azurite, unit tests for .NET isolated, Node v4 and Python v2…
от testland★ 18 звёзд на GitHubОб этом скилле
azure-functions-tests
Overview
Azure Functions Core Tools v4 (func.exe) provides a local runtime that
mirrors the Functions host on Azure. Per
learn.microsoft.com/azure/azure-functions/functions-run-local,
func start starts all triggers in the project directory and outputs the
URL of every HTTP-triggered function. Azurite emulates Blob, Queue, and
Table Storage locally so queue and timer triggers can be exercised without
a live storage account.
Nearest neighbours and how this skill differs:
aws-sam-local-testingwraps SAM Local for Lambda/API Gateway (its references/dotnet.md covers the .NET Lambda test runner). This skill is Azure-only and coversfunc start, Azurite, the .NET isolated worker model (Microsoft.Azure.Functions.Worker), and admin-endpoint invocation.serverless-integration-test-builderbuilds multi-function integration harnesses. This skill covers the per-function local invocation workflow.
When to use
- Local unit + integration tests for Azure Function handlers before deploy.
- Reproducing HTTP, queue, or timer trigger behaviour without deploying.
- CI gating on function handler logic in .NET, Node.js, or Python.
- Verifying binding configuration with Azurite instead of live Azure Storage.
How to use
- Install Core Tools v4 (
func --versionshows 4.x) and Azurite, then scaffold withfunc initand add triggers withfunc new- commands in references/local-setup.md. - Set
AzureWebJobsStoragetoUseDevelopmentStorage=trueinlocal.settings.jsonso queue and timer triggers route to Azurite; keep the file git-ignored. - Start Azurite, then run
func startfrom the project root and note the printed HTTP trigger URLs. - Exercise HTTP triggers with
curl; fire non-HTTP (queue/timer) triggers through the/admin/functions/<name>endpoint - see references/triggering-functions.md. - Unit-test handler logic directly (no running host) with the per-language patterns in references/unit-testing-handlers.md.
- Wire Core Tools + Azurite +
dotnet test/pytest/npm testinto CI using the workflow in references/triggering-functions.md. - Confirm binding config against Azurite; verify Managed Identity / RBAC in a staging environment (see Limitations).
Reference files
- Install, project init,
local.settings.json, Azurite, andfunc start: references/local-setup.md. - Firing HTTP / queue / timer triggers and the CI workflow: references/triggering-functions.md.
- Unit-testing handlers in .NET isolated, Node.js v4, and Python v2: references/unit-testing-handlers.md.
Worked example
A .NET isolated function OrderProcessor is triggered by the orders
queue. To gate it locally before deploy:
func init OrderApp --worker-runtime dotnet-isolated, thenfunc new --template "Azure Queue Storage Trigger" --name OrderProcessor.In
local.settings.json, set"AzureWebJobsStorage": "UseDevelopmentStorage=true".Run
azurite --silent --location ./azurite-datain one shell andfunc startin another.Fire the trigger through the admin endpoint:
curl --request POST -H "Content-Type: application/json" \ --data '{"input":"{\"orderId\":42}"}' \ http://localhost:7071/admin/functions/OrderProcessorThe host returns HTTP 202 (Accepted) and the function logs the processed order.
Unit-test
OrderProcessor.Runwith a mockedFunctionContext(xUnit), asserting the parsed order id - no host required.
Result: queue-trigger wiring is verified against Azurite and handler logic is gated in CI, with no live Azure Storage account.
Anti-patterns
| Anti-pattern | Why it fails | Fix |
|---|---|---|
| Skip Azurite for queue/timer triggers | Queue and storage triggers require AzureWebJobsStorage; without it func start errors |
Start Azurite and set "AzureWebJobsStorage": "UseDevelopmentStorage=true" in local.settings.json |
| Use in-process model for new projects | Support for in-process model ends 2026-11-10 per learn.microsoft.com/azure/azure-functions/dotnet-isolated-in-process-differences | Use --worker-runtime dotnet-isolated |
| Hard-code connection strings in code | Secrets leak to source control | Use local.settings.json Values array; it is git-ignored by default |
Call admin endpoint without Content-Type: application/json |
Host rejects the request | Always include Content-Type: application/json header and {"input":"..."} body |
Commit local.settings.json |
Contains secrets | Verify `.gitignore |
Установить azure-functions-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл azure-functions-tests?
Use when Azure Functions need testing before deploy: running them locally with Core Tools v4 and Azurite, unit tests for .NET isolated, Node v4 and Python v2 handlers, HTTP, queue and timer triggers, admin-endpoint calls and binding checks in local.settings.json.
Как установить скилл azure-functions-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл azure-functions-tests запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub