-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The equivalent of LETTUCE_USE_TEST_DATABASE #52
Comments
I can't reproduce this behavior, here's the example output with two features being run:
As you can see, the test database is only created and destroyed once. Are you sure there's no hooks that try to flush the database or do anything else to it? |
Yes, you are right. I wasn't accurate in my original post. I've overcame that by subclassing the test runner and override That solved the problem for me but I feel it would've been nicer if that settings flag is supported here to keep same behavior as lettuce |
Using the development database for tests is bad practice and will not be supported, as the tests must run from a clean state. You can try |
I agree that tests must be run from a clean state, in fact in our case each feature file must be run in clean state (with whole DB empty). I've solved the problem by inheriting from |
I know too well that the database creation can take a long time, this is why I'll check that |
Test cases tend to be extremely slow when destroying and create new DB after each feature (postgres).
We use
LETTUCE_USE_TEST_DATABASE = False
in lettuce to prevent the continuous destruction/creation and use hooks to clear the DB tables after each scenario.How do I achieve same thing with Aloe?
Right now I keep getting
Creating test database for alias 'default'...
Type 'yes' if you would like to try deleting the test database 'test_app_test', or 'no' to cancel: Got an error creating the test database: database "test_app_test" already exists
The text was updated successfully, but these errors were encountered: