ansible-test can selectively run tests in CI based on changes in a PR
This feature is not covered in the official documentation. It is enabled by using the --changed option. That option works locally (with caveats), and on AZP. It is not yet supported on GHA, although it should be possible to implement it.
To see it in use, take a look at the community.general collection. Here’s where it is enabled: community.general/tests/utils/shippable/shippable.sh at 47a19fad1bd23cd1d358d1538346bf9a977ed570 · ansible-collections/community.general · GitHub
ansible-test can collect and report on code coverage for integration tests.
There is brief mention of this feature in the official documentation: Testing Ansible and Collections — Ansible Community Documentation
To see it in use, take a look at the community.general collection. Here’s where it is enabled: community.general/tests/utils/shippable/shippable.sh at 47a19fad1bd23cd1d358d1538346bf9a977ed570 · ansible-collections/community.general · GitHub
NOTE: This feature can also be used locally. It doesn’t require CI or using a service like Codecov. It also works for unit and sanity tests (although only the import sanity test contributes to coverage).
ansible-test supports GHA, not just AZP, for creating ephemeral test VMs.
This feature is not covered in the official documentation, and is a relatively new feature. It is currently limited to specific projects within the ansible-collections and redhat-cop GitHub organizations, but we’re open to considering requests for usage in additional projects.
To see it in use, take a look at the amazon.aws collection. Here’s where it is enabled: amazon.aws/.github/workflows/integration.yml at c0bc9f945fbb94259b796077e23c37662358095c · ansible-collections/amazon.aws · GitHub
NOTE: This collection uses it for ephemeral AWS credentials (another feature I forgot to mention), rather than requesting a VM directly.
ansible-test can provide those same VMs to authorized users outside CI.
This is briefly mentioned in the official documentation: Testing Ansible and Collections — Ansible Community Documentation
As the documentation notes, users outside of authorized AZP (and now GHA) projects will require an API key to take advantage of this feature from their local system. Maintainers of collections authorized to use the feature in CI can request access for use on their local system.
ansible-test has integrated debugger support for VS Code and PyCharm for both Python and PowerShell code.
This feature is not covered in the official documentation, and is still considered experimental. As such, it doesn’t show up in the --help output for users unless they have the previously mentioned API key. However, despite that, any user can still use the feature.
The best reference for the options at the moment is to look at the code: ansible/test/lib/ansible_test/_internal/cli/environments.py at 405a6052b0238d5c1bbd956e83e4d12a0f692d51 · ansible/ansible · GitHub