{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/8"},{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/5"},{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/3"}],"enrichment":{"capability":"ops-scenario is a state-transition testing framework for Ops charms that lets you write unit tests by arranging a Juju state, emulating an event, and asserting on the resulting state without needing a full Juju installation.","skillfed_tags":["juju","charm-testing","state-transition"],"use_cases":["Test that a charm transitions to ActiveStatus after receiving a start event with minimal setup.","Verify charm behavior when relations change, including data exchange between units and peer relations.","Simulate container readiness and workload version changes to test container-aware charm logic.","Test secret handling by arranging secrets in the initial state and asserting on charm actions.","Validate charm configuration changes by including config in the input state and checking the output."],"what_it_does":"ops-scenario is a testing library that sits between your code and the Ops framework, letting you write unit tests that simulate Juju state transitions without running a full Juju deployment. You arrange an initial state (including relations, containers, secrets, and config), emit an event through a test context, and assert on the resulting state and any logged output. The library is designed to run at unit-test speeds while covering higher-level behavior than typical unit tests would.\n\nIt works by providing test doubles for Juju objects\u2014State, Context, Relation, Container, Secret, and others\u2014that you compose into a scenario. Tests follow the arrange/act/assert pattern, making them straightforward to write and read. The package is tightly integrated with ops itself; when ops-scenario is installed, its classes are exposed through the ops.testing namespace, so you import from ops rather than directly from ops-scenario.","worth_installing":"Yes. ops-scenario is actively maintained, has no known vulnerabilities, carries a permissive license, and is the recommended testing approach for Ops charms. It has low install friction and is designed to integrate seamlessly with ops itself. Install it if you are writing or maintaining Ops charms and want to test them without a full Juju setup."},"id":"ops-scenario","links":{"html":"https://skillfed.io/packages/ops-scenario","md":"https://skillfed.io/packages/ops-scenario.md","pypi":"https://pypi.org/project/ops-scenario/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-30","license_spdx":"Apache-2.0","license_treatment":"permissive","name":"ops-scenario","python_support":"supports_current","summary":"Python library providing a state-transition testing API for Operator Framework charms."},"popularity":{"monthly_downloads":184553,"position":10032,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"8.8.1"}
