From Mahara Wiki
Behat, in Mahara, has been around for a looooong time. We should try to modernise our usage of it.
A lot of what is in the shell script that we call to invoke behat looks to be work arounds to make it easier to use. A lot of these things are redundant with modern Behat and some of the things we've done actually make it harder to use.