SimpleTest Automator

My newest project is fixing up and improving SimpleTest Automator, and adding lots of new features. italic bold For those of you who don’t know what SimpleTest Automator is, it is a module that allows you to create SimpleTests without writing any code - just click around the user interface, and the test will do what you have done. Drupal

However, the way it’s done right now is quite sub-optimal. You enable the modules you want enabled for the test, then you go to the SimpleTest Automator administrator page, and enter a test name, file name, PHP name, etc., and permissions for the testing user. Then, it creates a new user for the testing user, switches you to it, and you record until you feel like stopping, at which point you click the “Stop Automator” link, and you’re switched back to your normal user. You don’t see that anything happened, except that all the changes you made stayed. You have no idea where your test ended up. Do you think you’ve made a mistake? You’ll need to re-install your site from scratch, and record the whole test again. You also can’t have more than one test without re-installing your site from scratch.

These are just some of the many fundamental flaws of the SimpleTest Automator module as it is today. It’s a very good module and concept for 1.0 version, but in reality most people need a bit more. That’s why I’m proposing to make a 2.0 version (I’ve already coded quite a bit of it).

In the 2.0 version of SimpleTest Automator, all tests will be run in a “child instance” of Drupal, which is basically another installation of Drupal, and each test will be . All tests will be editable, because tests will be stored in the database as collections of actions. An action could be clicking a link, submitting a form, or asserting some text. Actions will be editable after they are recorded through a nice-looking user interface, and the PHP isn’t generated until you request it to be generated.

I’m sure there’s something that I haven’t described above that you want, so please leave a comment, because now would be the time - I don’t like changing my APIs once I already have a ton of code that uses them.

Comments