[ckan-dev] Running tests quickly

David Read david.read at hackneyworkshop.com
Thu May 17 17:09:10 UTC 2012


David Raznick has helped me get the ckan tests running quicker by
running in parallel. Here are the timings on my machine before and
after:

sqlite: 5 minutes
postgres ramdisk: 10 minutes.
postgres ramdisk with 4 processes: 6 minutes

I think David has the record on Postgres running in 4 minutes on his
machine. If anyone's interested here is David's shell script, which
uses four databases:

#CKAN_DB=postgres://david:ypass@localhost/ckantest1 CKAN_SITE_ID=test1
nosetests --ckan --with-pylons=test-core.ini ckan/tests --segments=2b
&
#CKAN_DB=postgres://david:ypass@localhost/ckantest2 CKAN_SITE_ID=test2
nosetests --ckan --with-pylons=test-core.ini ckan/tests
--segments=4567 &
#CKAN_DB=postgres://david:ypass@localhost/ckantest3 CKAN_SITE_ID=test3
nosetests --ckan --with-pylons=test-core.ini ckan/tests
--segments=189a &
#CKAN_DB=postgres://david:ypass@localhost/ckantest4 CKAN_SITE_ID=test4
nosetests --ckan --with-pylons=test-core.ini ckan/tests
--segments=30cdef &

Dave




More information about the ckan-dev mailing list