[Fixed]-Django: How to keep the test database when the test is finished?

2👍

You can run:

./manage.py testserver

Your test database will be created, all your tests are run and afterwards the server keeps running, so you can do your ui testing.

hope this helps,
Anton

👤Anton

35👍

New in Django 1.8

The –keepdb option can be used to preserve the test database between test runs

https://docs.djangoproject.com/en/1.8/ref/django-admin/#django-admin-option—keepdb

👤Koed00

1👍

Persistent Database Test Runner adds a new command called quicktest that will retain the database after the test is run, and use the same when run again.

👤lprsd

Leave a comment