At AnsibleFest a couple of weeks ago, the presentation on the Ansible Galaxy ecosystem talked a lot about moving toward using molecule as part of the developer workflow. Molecule would be used both to initialize roles, and then to test them (along with ansible-lint). It's also expected that ansible-lint results will start getting applied as one content scoring factor on roles in Galaxy. I haven't worked with molecule much myself yet, though.
Galaxy had been allowed to coast for a little while, but apparently activity to improve it is heating up quite a bit.
In short - yes. Molecule is a framework for testing ansible artifacts. Both molecule and ansible-lint have been adopted by the ansible community. I expect that in the coming months/year, there will be much better documentation, tradecraft, and integration of molecule/ansible-lint with regard to the ansible ecosystem.
In general, ansible playbooks and roles should be routinely tested, especially when changes are made to those artifacts.
Does that help?
Jeff Geerling (geerlingguy), one of the more prolific role developers on Ansible Galaxy, has just started to use molecule for his projects. He posted a blog entry in the last few days that I haven't had a chance to read through yet, that you might find relevant: https://www.jeffgeerling.com/blog/2018/testing-your-ansible-roles-molecule.
Upstream Ansible Galaxy development is working on a possible replacement for the current ansible-galaxy tool, called mazer. One of the design goals is to integrate that tool into a workflow that also includes molecule and ansible-lint for development and testing. It's still very much a tech preview, though, and things could work out differently after they experiment with it for a while. However, both molecule and ansible-lint are now part of the Ansible community project.
Molecule docs: https://molecule.readthedocs.io/en/latest/
Molecule GitHub repository: https://github.com/ansible/molecule
I realize this is an old post but as I'm adding molecule to some of the roles I'm developing I have run into a number of issues.
First issue is that I am unable to test roles that require additional repos to be enabled via rhsm if the container OS differs from the host.
See also my StackOverflow post on this issue . Basically enabling the "rhel-server-rhscl-7-rpms" repo using rhsm_repository in a RHEL7 UBI container on a RHEL8 host fails.
Also testing a role on Ubuntu18 in addition to RHEL7/8 failed because the Ubuntu container does not have systemd available.