~registry/ubuntu-friendly/trunk

« back to all changes in this revision

Viewing changes to docs/testing.rst

  • Committer: Mike Heald
  • Date: 2012-05-18 15:13:52 UTC
  • mfrom: (140.1.7 ubuntu-friendly)
  • Revision ID: mike.heald@canonical.com-20120518151352-wkx5p6awxkgn7la3
Makefile and documentation [r=Cody] [r=schwuk]

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Testing
 
2
=======
 
3
 
 
4
.. note::
 
5
 
 
6
    Ubuntu Friendly makes use of django-nose (and nose) for testing. 
 
7
 
 
8
The quickest way to run tests is via a Makefile target::
 
9
 
 
10
    $ make tests
 
11
 
 
12
You can have more control, e.g. to get a coverage report::
 
13
 
 
14
    $ source bin/activate
 
15
    $ cd apps
 
16
    $ ./manage.py test --with-coverage
 
17
 
 
18
Run tests for a specific application::
 
19
 
 
20
    $ ./manage.py test --tests results
 
21
 
 
22
Run a specific test::
 
23
 
 
24
    $ ./manage.py test --tests results.tests:ResultsRecordImporterTest.test_import_record
 
25
 
 
26
Improving performance
 
27
---------------------
 
28
To get better performance for running tests, set the following options
 
29
in your postgresql.conf::
 
30
 
 
31
    fsync = off
 
32
    synchronous_commit = off
 
33
    autovacuum = off