{"enrichment":{"faq":[{"a":"Prowler-test-sdk provides patterns for writing unit tests for Prowler SDK checks and services. Tests use pytest fixtures to set up mocked cloud resources, with provider-specific mocking strategies: moto for AWS resource mocking, and MagicMock for Azure, GCP, and Kubernetes providers. Each test verifies check logic by asserting pass/fail/no-resource outcomes against mocked infrastructure.","q":"How do I test prowler checks?"},{"a":"Prowler-test-sdk uses moto to mock AWS resources in unit tests. Moto decorators intercept boto3 calls, allowing tests to create and inspect simulated AWS infrastructure without hitting real APIs. This enables deterministic testing of Prowler checks against controlled resource states and configurations.","q":"What mocking approach does prowler-test-sdk use for AWS?"},{"a":"Prowler-test-sdk uses MagicMock to mock Azure and GCP providers, along with Kubernetes. MagicMock patches client methods and responses, allowing tests to simulate provider-specific behaviors without external dependencies. This approach provides flexibility for mocking complex cloud provider APIs and custom resource structures.","q":"How does prowler-test-sdk handle Azure and GCP testing?"},{"a":"Prowler-test-sdk establishes conventions for test file organization, including fixture definitions for client setup, resource initialization, and check invocation. Tests follow a consistent structure: arrange mocked resources, execute the check, and assert expected pass/fail/no-resource outcomes. Fixtures enable reusable test components across multiple check tests.","q":"What is the prowler-test-sdk test file structure?"},{"a":"Prowler-test-sdk tests verify three core scenarios: pass (compliant resources), fail (non-compliant resources), and no-resource (when no resources exist). Each scenario uses mocked provider clients to simulate conditions, then asserts that the check produces correct findings with appropriate status codes and metadata.","q":"How does prowler-test-sdk verify compliance check scenarios?"},{"a":"Prowler-test-sdk documents provider-specific mocking patterns: AWS uses moto decorators for resource lifecycle simulation; Azure, GCP, and Kubernetes use MagicMock for client patching and response mocking. Each pattern establishes how to configure clients, inject mock data, and verify check behavior against provider-specific API contracts.","q":"What are prowler-test-sdk provider mocking patterns?"}],"shadow_tags":["unit-testing-framework","cloud-provider-mocking","compliance-check-validation","multi-cloud-testing","infrastructure-as-code-testing"],"summary_rewrite":"This skill documents testing conventions for Prowler SDK checks and services across multiple cloud providers. It covers AWS testing with moto mocking, Azure and GCP testing with MagicMock, and establishes provider-specific patterns for fixtures, client patching, and assertion structures."},"files":[{"bytes":10272,"path":"skills/prowler-test-sdk/SKILL.md","sha256":"709c0755f8275c84ca06d1a83f03d88562b55cffda212e0ca9196bf9e6c3416d","url":"https://skillfed.io/files/prowler-cloud/prowler/prowler-test-sdk/2d0eda1d/SKILL.md"}],"id":"prowler-cloud/prowler/prowler-test-sdk","links":{"html":"https://skillfed.io/prowler-cloud/prowler/prowler-test-sdk","md":"https://skillfed.io/prowler-cloud/prowler/prowler-test-sdk.md","repo":"https://github.com/prowler-cloud/prowler"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":2285,"language":"Python","last_updated":"2026-07-27","license":"Apache-2.0","name":"prowler-test-sdk","publisher":"prowler-cloud","stars":14491},"relations":{"similar":[{"id":"prowler-cloud/prowler/tdd"},{"id":"prowler-cloud/prowler/prowler-test-api"},{"id":"prowler-cloud/prowler/pytest"},{"id":"prowler-cloud/prowler/prowler-sdk-check"},{"id":"cyanheads/mcp-ts-core/add-test"},{"id":"cyanheads/pubmed-mcp-server/add-test"},{"id":"prowler-cloud/prowler/prowler-provider"},{"id":"prowler-cloud/prowler/prowler"},{"id":"prowler-cloud/prowler/prowler-compliance-review"},{"id":"prowler-cloud/prowler/vitest"}]},"slug":{"owner":"prowler-cloud","repo":"prowler","skill":"prowler-test-sdk"},"version":"2d0eda1d"}
