So I am experimenting with the introduction of selenium unit tests in django 1.4 in a couple of projects I am working on.
The standard way to run my unit tests are simply to do ./manage.py test and I use django-ignoretests to exclude specific django apps that I do not want tested (as needed).
However, is there a way to configure my project so that I can decide to run only selenium tests when I want to and have ./manage.py test run only standard unit tests.
What are some best practices for segregating and organizing selenium tests and standard unit tests?
You could always group all your selenium tests under a single package
myapp/selenium_tests/(as described here https://stackoverflow.com/a/5160779/1138710 for instance) and then runmanage.py test myapp.selenium_testsand group the rest of tests under saymyapp/other_tests.Otherwise, I suppose you could write a test runner that checks for each test class whether it derives from
LiveServerTestCase(see the docs: https://docs.djangoproject.com/en/dev/topics/testing/#defining-a-test-runner)