### Development environment setup and test execution Source: https://github.com/yugokato/pytest-smoke/blob/main/README.md Commands to synchronize dependencies, install git hooks, and run tests or the full test/lint matrix using uv. ```bash uv sync # create .venv with all dev dependencies uv run pre-commit install # install git hooks (keeps uv.lock in sync) uv run pytest tests -n auto # run the test suite uv run tox # run the full test/lint matrix ``` -------------------------------- ### Install pytest-smoke Source: https://github.com/yugokato/pytest-smoke/blob/main/README.md Install the plugin using pip. ```bash pip install pytest-smoke ``` -------------------------------- ### Example test suite structure Source: https://github.com/yugokato/pytest-smoke/blob/main/README.md A sample test file containing standard and parameterized tests used to demonstrate smoke testing. ```python import pytest def test_something1(): pass @pytest.mark.parametrize("p", range(10)) def test_something2(p): pass @pytest.mark.parametrize("p", range(20)) def test_something3(p): pass ``` -------------------------------- ### View pytest-smoke help options Source: https://github.com/yugokato/pytest-smoke/blob/main/README.md Display the available command-line options for smoke testing. ```bash $ pytest -h ``` -------------------------------- ### Run smoke tests Source: https://github.com/yugokato/pytest-smoke/blob/main/README.md Execute a smoke test using default options. ```bash pytest --smoke ``` -------------------------------- ### Run first test from each function Source: https://github.com/yugokato/pytest-smoke/blob/main/README.md Executes the first test case from each test function using the default --smoke flag. ```bash $ pytest -v --smoke ======================== test session starts ========================== collected 31 items / 28 deselected / 3 selected tests/test_something.py::test_something1 PASSED [ 33%] tests/test_something.py::test_something2[0] PASSED [ 66%] tests/test_something.py::test_something3[0] PASSED [100%] =================== 3 passed, 28 deselected in 0.02s =================== ``` -------------------------------- ### Run percentage of tests per function Source: https://github.com/yugokato/pytest-smoke/blob/main/README.md Executes 20% of the tests from each test function by providing a percentage string to --smoke. ```bash $ pytest -v --smoke 20% ======================== test session starts ========================== collected 31 items / 24 deselected / 7 selected tests/test_something.py::test_something1 PASSED [ 14%] tests/test_something.py::test_something2[0] PASSED [ 28%] tests/test_something.py::test_something2[1] PASSED [ 42%] tests/test_something.py::test_something3[0] PASSED [ 57%] tests/test_something.py::test_something3[1] PASSED [ 71%] tests/test_something.py::test_something3[2] PASSED [ 85%] tests/test_something.py::test_something3[3] PASSED [100%] =================== 7 passed, 24 deselected in 0.02s =================== ``` -------------------------------- ### Run fixed number of tests per function Source: https://github.com/yugokato/pytest-smoke/blob/main/README.md Executes up to 3 tests from each test function by providing the integer argument to --smoke. ```bash $ pytest -v --smoke 3 ======================== test session starts ========================== collected 31 items / 24 deselected / 7 selected tests/test_something.py::test_something1 PASSED [ 14%] tests/test_something.py::test_something2[0] PASSED [ 28%] tests/test_something.py::test_something2[1] PASSED [ 42%] tests/test_something.py::test_something2[2] PASSED [ 57%] tests/test_something.py::test_something3[0] PASSED [ 71%] tests/test_something.py::test_something3[1] PASSED [ 85%] tests/test_something.py::test_something3[2] PASSED [100%] =================== 7 passed, 24 deselected in 0.02s =================== ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.