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

**URL:** <https://forum.ansible.com/t/should-we-be-using-molecule-or-ansible-test-for-unit-integration-tests/5539>\
**Category:** Get Help\
**Tags:** ansible-test, molecule, galaxy-ng\
**Created:** [May 6, 2024, 10:11pm UTC](https://forum.ansible.com/t/should-we-be-using-molecule-or-ansible-test-for-unit-integration-tests/5539 "2024-05-06T22:11:50Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [January 5, 2026, 10:34pm UTC](https://forum.ansible.com/t/should-we-be-using-molecule-or-ansible-test-for-unit-integration-tests/5539/7 "2026-01-05T22:34:33Z")

</div>

Hi @russoz

I saw your post [Integrating `ansible-test integration` (no pun intended) and `molecule`](https://forum.ansible.com/t/integrating-ansible-test-integration-no-pun-intended-and-molecule/45018) 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.](https://github.com/ansible-collections/community.beszel) 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](https://forum.ansible.com/t/your-feedback-wanted-the-ansible-collection-developer-and-maintainer-journey/44592/4) - speaking to `ansible-test`:

> The tool was originally designed to test `ansible-core` , not collections. [As occasionally mentioned here for sometime](https://forum.ansible.com/t/error-invalid-extension-official-ansible-modules-must-have/5719/4), 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](https://forum.ansible.com/t/help-test-molecule-v25-9-0-rc1-pre-release/44345), 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.

---

_[View the full topic](https://forum.ansible.com/t/should-we-be-using-molecule-or-ansible-test-for-unit-integration-tests/5539)._
