fixturelevel
Fixturelevel is a term used in software testing to describe the level of a test fixture’s lifecycle within a test suite. It refers to the granularity at which resources and setup code are created and torn down for tests, affecting isolation, performance, and resource usage. In practice, fixturelevel corresponds to the scope of fixtures, with common levels including function (per-test), class (per test class), module (per module), and session (per entire test run). Some frameworks also include a per-suite option or variations such as per-collection, but function, class, module, and session cover the most widely used cases.
While the exact terminology varies by framework, the underlying concept is widely supported. In frameworks like
Usage and effects: a function-level fixturelevel creates fresh resources for every test, promoting strict isolation but
See also: fixtures, test scope, setup and teardown, pytest scope, resource management.