## Testing and QA

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

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Can I use a separate DB for Behat similar to PHPUnit?

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: -
Re: Can I use a separate DB for Behat similar to PHPUnit?

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

Average of ratings: -
Re: Can I use a separate DB for Behat similar to PHPUnit?
I can confirm it doesn't work (sorry).

Average of ratings: -
Re: Can I use a separate DB for Behat similar to PHPUnit?

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

Average of ratings: -
Re: Can I use a separate DB for Behat similar to PHPUnit?

This is not supported yet, but surely will be helpful.

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

Average of ratings: -
Re: Can I use a separate DB for Behat similar to PHPUnit?