一键导入
azure-integration-tester
// Run post-deployment integration tests for Azure resources. Verify Function Apps, Storage Accounts, Databases, App Services are healthy and accessible. Use after successful Azure deployment.
// Run post-deployment integration tests for Azure resources. Verify Function Apps, Storage Accounts, Databases, App Services are healthy and accessible. Use after successful Azure deployment.
Analyze deployed Azure resource groups and generate detailed Mermaid architecture diagrams showing relationships between resources. Use for post-deployment visualization, understanding existing infrastructure, or documenting live Azure environments.
Onboard a repository, Azure subscription(s), and user identity for Git-Ape CI/CD using a skill-driven CLI playbook. Use for first-time setup of OIDC, federated credentials, RBAC, GitHub environments, and required secrets.
Check that all required CLI tools are installed, meet minimum versions, and have active auth sessions. Shows platform-specific install commands for anything missing.
Estimate monthly costs for Azure resources by querying the Azure Retail Prices API. Parses ARM templates to identify resources, SKUs, and regions, then looks up real retail pricing. Produces a per-resource cost breakdown with monthly totals. Use during template generation or when user asks about costs.
Run preflight validation on ARM templates before deployment. Performs what-if analysis, permission checks, and generates a structured report with resource changes (create/modify/delete). Use before any deployment to preview changes and catch issues early.
Detect configuration drift between deployed Azure resources and stored deployment state. Compare actual Azure configuration against desired state in .azure/deployments/, identify differences, and guide user through reconciliation options. Use when checking for manual changes, policy remediations, or unauthorized modifications.
| name | azure-integration-tester |
| description | Run post-deployment integration tests for Azure resources. Verify Function Apps, Storage Accounts, Databases, App Services are healthy and accessible. Use after successful Azure deployment. |
| argument-hint | Deployment outputs (resource IDs and endpoints) |
| user-invocable | true |
Run comprehensive integration tests on deployed Azure resources to verify they are functional, accessible, and properly configured.
Parse deployment outputs to identify resource types:
For Function Apps:
Execute test-function-app.sh:
./scripts/test-function-app.sh \
--url "https://func-api-dev-eastus.azurewebsites.net" \
--resource-group "rg-webapp-dev-eastus" \
--name "func-api-dev-eastus"
Tests performed:
For Storage Accounts:
Execute test-storage.sh:
./scripts/test-storage.sh \
--account-name "stwebappdev8k3m" \
--resource-group "rg-webapp-dev-eastus"
Tests performed:
For Databases:
Execute test-database.sh:
./scripts/test-database.sh \
--type "sqldb" \
--server "sql-webapp-dev-eastus.database.windows.net" \
--database "mydb" \
--resource-group "rg-webapp-dev-eastus"
Tests performed:
Check that security best practices are applied:
# HTTPS-only enforcement
az resource show --ids {resource-id} --query "properties.httpsOnly"
# Managed identity enabled
az resource show --ids {resource-id} --query "identity.type"
# TLS version
az resource show --ids {resource-id} --query "properties.minTlsVersion"
# Diagnostic logs enabled
az monitor diagnostic-settings list --resource {resource-id}
Output a comprehensive test report:
## Integration Test Report
**Deployment ID:** {deployment-id}
**Tested:** {timestamp}
**Duration:** {test-duration}
### Test Results
#### Function App: func-api-dev-eastus
- ✅ HTTP endpoint accessible (200 OK)
- ✅ Response time: 245ms (threshold: 3000ms)
- ✅ HTTPS enforcement verified
- ✅ Application Insights connected
- ⚠️ No custom health endpoint found (using default)
#### Storage Account: stwebappdev8k3m
- ✅ Blob service accessible
- ✅ Test blob created/read/deleted successfully
- ✅ HTTPS-only enforced
- ✅ TLS 1.2 minimum version set
#### Security Configuration
- ✅ All resources use HTTPS-only
- ✅ Managed identities configured
- ✅ Diagnostic logging enabled
- ✅ Resource tags applied correctly
### Summary
**Total Tests:** 12
**Passed:** 11 ✅
**Warnings:** 1 ⚠️
**Failed:** 0 ❌
**Overall Status:** HEALTHY ✅
### Recommendations
1. Consider adding custom health endpoint to Function App for better monitoring
2. Configure Application Insights alerts for failures
3. Enable auto-scaling if expecting variable load
### Next Steps
Your Azure resources are deployed and verified. You can now:
1. Deploy your application code to the Function App
2. Configure any application-specific settings
3. Set up CI/CD pipelines for automated deployments
4. Monitor resources in Azure Portal
**Azure Portal Links:**
- Function App: https://portal.azure.com/#@{tenant}/resource{function-app-id}
- Resource Group: https://portal.azure.com/#@{tenant}/resource{rg-id}
All test scripts are located in the ./scripts/ directory:
See test-patterns.md for detailed test patterns including:
If tests fail, provide diagnostic information:
❌ **Test Failed: Function App Endpoint**
**Error:** Connection refused
**Endpoint:** https://func-api-dev-eastus.azurewebsites.net
**Possible Causes:**
1. Function App still starting up (can take 2-3 minutes after deployment)
2. Network security group blocking access
3. Function App in stopped state
**Troubleshooting:**
1. Wait 2 minutes and retry
2. Check Function App status: `az functionapp show --name {name} --resource-group {rg} --query "state"`
3. View logs: `az webapp log tail --name {name} --resource-group {rg}`
**Retry Command:**
./scripts/test-function-app.sh --url {url} --retry 3 --delay 30
Some tests may not apply:
In these cases, output:
ℹ️ **Integration Tests: N/A**
No testable endpoints for Resource Group deployments.
Verified resource creation via Azure Resource Graph instead.
After Function App deployment:
@git-ape deploy a python function app
[... deployment completes ...]
/azure-integration-tester {deployment-outputs}
Manual invocation:
/azure-integration-tester
Please provide deployment outputs or resource details:
- Function App URL: https://func-api-dev-eastus.azurewebsites.net
- Resource Group: rg-webapp-dev-eastus
- Storage Account: stwebappdev8k3m
Always provide: