Can I use a separate DB for Behat similar to PHPUnit?

Can I use a separate DB for Behat similar to PHPUnit?

by Urs Hunkler -
Number of replies: 5
Picture of Core developers

I try to configure Behat to use a separate DB similar to PHPUnit but Moodle adds the Behat tables to the main Moodel DB.

For PHPUnit I set the extra DB and the tables are set up in that DB:

$CFG->phpunit_dbname = 'moodle_phpu';


For Behat I try without success:

$CFG->behat_dbname = 'moodle_b';


I want to use different DBs because I experience SQL failures when I set up Behat and PHPUnit using one DB and open a MySQL editor to check database tables on a Mac with Mavericks. I quite often need to close the MySQL editor and restart the MySQL server to get rid off the drop outs.

After deleting the Behat and PHPUnit tables in the main Moodle DB I can verify that the issues are gone.

So please tell me how to force Behat to use a separate DB similar to PHPUnit.

Thanks a lot for your help.

Average of ratings: -
In reply to Urs Hunkler

Re: Can I use a separate DB for Behat similar to PHPUnit?

by Urs Hunkler -
Picture of Core developers

Anybody? A confirmation that there is no chance would be ok.

In reply to Urs Hunkler

Re: Can I use a separate DB for Behat similar to PHPUnit?

by Damyon Wiese -
I can confirm it doesn't work (sorry).

In reply to Damyon Wiese

Re: Can I use a separate DB for Behat similar to PHPUnit?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

But, it sounds like it might be a sensible option to add, particularly if it makes it more similar to PHPUnit.

In reply to Urs Hunkler

Re: Can I use a separate DB for Behat similar to PHPUnit?

by Rajesh Taneja -
This is not supported yet, but surely will be helpful.


I have created MDL-46778 and hopefully this gets in soon smile

In reply to Urs Hunkler

Re: Can I use a separate DB for Behat similar to PHPUnit?

by Urs Hunkler -
Picture of Core developers

Thanks a lot for your answers everybody.