{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/2"},{"label":"Systems Administration","url":"https://skillfed.io/packages/category/system-systems-administration"}],"enrichment":{"capability":"A pytest plugin that lets you write Python unit tests to verify the actual state of servers\u2014files, packages, services, users\u2014configured by infrastructure management tools.","skillfed_tags":["infrastructure-testing","configuration-management","server-validation"],"use_cases":["Verify that Ansible playbooks or Puppet manifests correctly installed packages and configured services on target servers.","Assert file permissions, ownership, and content match infrastructure-as-code specifications after deployment.","Check that running services are enabled and listening on expected ports after configuration management runs.","Test user and group creation, membership, and home directory setup across a fleet of servers.","Validate system state in CI/CD pipelines after infrastructure provisioning to catch configuration drift early."],"what_it_does":"Pytest-testinfra is a pytest plugin that brings infrastructure testing into Python. Instead of writing shell scripts or separate test frameworks to verify server configuration, you write pytest test functions that inspect the actual state of your infrastructure\u2014checking whether files exist with the right permissions, packages are installed, services are running, users have correct groups, and so on. It acts as a Python equivalent to Serverspec, integrating directly with pytest's test runner and reporting.\n\nYou typically use it after provisioning servers with tools like Ansible, Puppet, Chef, or Salt to verify that the configuration management actually produced the desired state. The package provides a `host` fixture that abstracts away the details of connecting to and querying target machines, so your tests read like straightforward assertions rather than shell command chains.","worth_installing":"Yes, if you manage infrastructure with configuration tools and want to verify actual server state in Python. The single pytest dependency keeps install friction low, and the permissive license poses no barrier. The aging maintenance status (502 days since last release) is a caution: the package is stable but may respond slowly to bugs or new requirements. Suitable for production use in established infrastructure workflows."},"id":"pytest-testinfra","links":{"html":"https://skillfed.io/packages/pytest-testinfra","md":"https://skillfed.io/packages/pytest-testinfra.md","pypi":"https://pypi.org/project/pytest-testinfra/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-03-30","license_spdx":null,"license_treatment":"permissive","name":"pytest-testinfra","python_support":"supports_current","summary":"Test infrastructures"},"popularity":{"monthly_downloads":1545408,"position":3779,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"10.2.2"}
