I try to create an automated test for my drupal 7 site to test my rather complex access logic. I am using features, git and drush and a couple of shell scripts for staging. Works great.
My site involves a node access control based on several facts. I wrote a custom module (actually a feature) to create the workflow rules (other workflow module were not fitting my needs)
- workflow_state (custom field)
- workflow history
- global roles
- organic group roles
I wrote a custom access_module to handle all the node access and it works all great - for now, for the current configuration.
The problem - configuration testing
In my opinion simple test is not the right tool to test my site (at least the access logic). I want to test if my custom code AND custtom configuration are still working together as expected. I want to test if - with the current og, roles,... configuration - my site still meets my requirements after intergration new features. I think simple test is more for testing a certain modul rather than testing your configuration.
I thought of writing a custom mymodule_test.module that I can activate on a testing/staging instance with the following pupose:
- Programmatically create users, groups and nodes
- Programmatically check via node_access if the access system works a desired.
But before I do this I wanted to ask the community: What do you think of it? How do you test your site? What tools di you use?