This is a bit of a follow-up to Mike Bell's introductory article on using Codeception to create Drupal test suites. He concludes by stating he "need[s] to figure out a way of creating a Codeception module which allows you to plug in a Drupal testing user (ideally multiple so you can test each role) and then all the you have to do is call a function which executes the above steps to confirm your logged in before testing authenticated behaviour."
"Something along the lines of:
So, after skimming through Codeception and Mink documentation, I've tinkered with two potential ways of achieving this... for acceptance testing at least.
A crude toolbox
The first method is to use two custom classes to provide details of (a) a general Drupal site and (b) the specific site to be tested. This idea stemmed from this article which suggests that including literals - such as account credentials, paths and even form labels - in tests is bad practice. What if the login button label changes?
The project existence for Drupal 7 is only justified by the gnat's arse whisker of Token support and a couple of functions from the early days of the module that others may be relying on. There really isn't much else, and I'm hoping someone else looks at Views support because quite frankly, I can't be bothered.
I've dumped the code on GitHub for now: there is no upgrade path from "old" Role Weights to the new core ones, and no Views integration. Give it a whirl if you still need the module and report any problems to the Update to Drupal 7.x issue on drupal.org.
Seriously, I'll probably get a working 7.x version released and not much more: I don't use it on any of our personal or client sites... anyone out there want to pick it up?