Should we be using molecule or ansible-test for unit/integration tests?

Hi @russoz

I saw your post Integrating `ansible-test integration` (no pun intended) and `molecule` over the holidays but unfortunately I didn’t have a chance to reply until now. I’m interested in this topic and your approach to using molecule for integration tests in the community.openwrt collection because I initially looked at doing something similar for GitHub - ansible-collections/community.beszel: Ansible content to automate the configuration of Beszel Hub and Agents. The Beszel project publishes a container image for the Beszel Hub and when I was initially looking to create the integration tests, I thought molecule would be an ideal fit. However, when I checked the documentation early on in my maintainer journey found that ansible-test integration is the method used for running integration tests.

I think this topic ties in with a comment made by @tima last year: Your Feedback Wanted: The Ansible Collection Developer and Maintainer Journey - #4 by tima - speaking to ansible-test:

The tool was originally designed to test ansible-core , not collections. As occasionally mentioned here for sometime, the long-term plan was for ansible-test to remain focused on core, with a separate tool emerging for the collection ecosystem.

@tima goes on further to mention:

With an overhauled Molecule nearing completion, it might be a good time for the community to discuss updating the documentation to recommend Molecule as the standard tool for collection testing.

Now that community.openwrt is using molecule for collection integration tests, and I could implement similar for community.beszel, it’s probably worth discussing more in depth about how molecule could be used for collection testing (not just roles but for integration tests too), and maybe creating some convention around how that could look in a collection (repository / file structure) for molecule scenarios when wanting to use molecule for integration tests and get some documentation created around it.

Interested in your thoughts @russoz.