# Unified Collection Testing Strategy - Kick off & Landscape Overview

**URL:** <https://forum.ansible.com/t/unified-collection-testing-strategy-kick-off-landscape-overview/45799>\
**Category:** Collection Development\
**Tags:** azure, fedora, ubuntu, collection-test-strat, ansible-lint, galaxy-ng\
**Created:** [May 14, 2026, 4:23pm UTC](https://forum.ansible.com/t/unified-collection-testing-strategy-kick-off-landscape-overview/45799 "2026-05-14T16:23:45Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![dbrennand](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dbrennand/32/7830_2.png) [@dbrennand](https://forum.ansible.com/u/dbrennand)\
**Post date:** [May 16, 2026, 4:35pm UTC](https://forum.ansible.com/t/unified-collection-testing-strategy-kick-off-landscape-overview/45799/18 "2026-05-16T16:35:41Z")

</div>

> [@felixfontein](#):
>
> Change detection and code coverage are likely _the_ `ansible-test unit` and `ansible-test integration` features that are not covered by any other unit/integration test runner I’m aware of (except by wrapper runners like antsibull-nox, which fall back to ansible-test for the heavy lifting).

Hey @felixfontein - Whilst reviewing the `pytest-ansible` source I did notice an option for running `molecule` scenarios called `skip_no_git_change`: [pytest-ansible/src/pytest\_ansible/molecule.py at main · ansible/pytest-ansible · GitHub](https://github.com/ansible/pytest-ansible/blob/main/src/pytest_ansible/molecule.py#L201-L218)

I can’t find any documentation on this option (_sigh…_) but it looks to skip scenarios when no changes are detected via `git diff` to the role. However, it appears to be outdated given the newest convention for molecule scenario location inside a collection is `extensions/molecule`. It’s looking for molecule scenarios inside the role directory itself (e.g., `roles/<role>/molecule/<scenario>/molecule.yml`).

Regarding code coverage, I wanted to see if I could get `pytest-cov` working with `tox-ansible` and I have managed to with the use of `.coveragerc` and slight modification to the `tox-ansible.ini` file: [Implement tox-ansible for collection testing by dbrennand · Pull Request #40 · ansible-collections/community.beszel · GitHub](https://github.com/ansible-collections/community.beszel/pull/40/changes/a7013204a68e9fff2b1a2b01d002bb7ad33c0982)

It would be nice if this could be a supported feature out of the box, say like a `--coverage` argument:

```auto
unit-py3.10-2.17: commands[0]> python3 -m pytest --cov --cov-config=.coveragerc --ansible-unit-inject-only ./tests/unit
======================================================================== test session starts =========================================================================
platform darwin -- Python 3.10.20, pytest-9.0.3, pluggy-1.6.0
cachedir: .tox/unit-py3.10-2.17/.pytest_cache
ansible: 2.17.14
rootdir: /Users/dab/github.com/dbrennand/community.beszel
configfile: pyproject.toml
plugins: ansible-26.4.0, cov-7.1.0, xdist-3.8.0, anyio-4.13.0
collected 26 items                                                                                                                                                   

tests/unit/plugins/modules/test_system.py .......... [38%]
tests/unit/plugins/modules/test_system_info.py .... [53%]
tests/unit/plugins/modules/test_universal_token.py ............ [100%]

=========================================================================== tests coverage ===========================================================================
_________________________________________________________coverage: platform darwin, python 3.10.20-final-0__________________________________________________________

Name Stmts Miss Cover Missing
------------------------------------------------------------------------
plugins/module_utils/pocketbase_utils.py 33 25 24% 9-12, 17-23, 27-36, 40-49
plugins/modules/system.py 101 22 78% 176-178, 208-209, 232, 263-264, 273-274, 289-299, 313-314, 369-370, 393-394, 406
plugins/modules/system_info.py 38 7 82% 127-129, 153, 174-175, 191
plugins/modules/universal_token.py 52 5 90% 109-111, 145, 202
------------------------------------------------------------------------
TOTAL 224 59 74%
========================================================================= 26 passed in 0.30s =========================================================================
  unit-py3.10-2.17: OK (10.56=setup[1.46]+cmd[7.61,0.41,1.09] seconds)
  congratulations :) (11.05 seconds)

```

---

_[View the full topic](https://forum.ansible.com/t/unified-collection-testing-strategy-kick-off-landscape-overview/45799)._
