ninuxorg / nodeshot

Django based tools to create crowdsourcing web apps.
http://docs.nodeshot.org/
Other
324 stars 113 forks source link

Reduce time required to run unit tests #247

Closed nemesifier closed 8 years ago

nemesifier commented 8 years ago

The entire test suite takes too much time to run.

Possible solutions:

Ideally each test suite should take less than a couple of minutes to run, while the entire test suite shouldn't take longer than 10 minutes, although now we are quite far from this result!

Useful resources:

UPDATE

I wrote a wrap up here: http://nemesisdesign.net/blog/coding/how-to-speed-up-tests-django-postgresql/

nemesifier commented 8 years ago

Postgresql tweaks to add on the docs:

# /etc/postgresql/9.1/main/postgresql.conf
fsync = off
synchronous_commit = off
full_page_writes = off
nemesifier commented 8 years ago

django 1.8 --keepdb option for the test command, plus the postgresql.conf optimizations are the real winners.

There are a few other slow tests that will need to be refactored or mocked.

nemesifier commented 8 years ago

Now is very fast!! :+1: