From 2f02a05ffb45be68b4164b4785ff1826833150a3 Mon Sep 17 00:00:00 2001 From: Julien Phalip Date: Thu, 22 Dec 2011 08:33:58 +0000 Subject: Fixed #2879 -- Added support for the integration with Selenium and other in-browser testing frameworks. Also added the first Selenium tests for `contrib.admin`. Many thanks to everyone for their contributions and feedback: Mikeal Rogers, Dirk Datzert, mir, Simon G., Almad, Russell Keith-Magee, Denis Golomazov, devin, robertrv, andrewbadr, Idan Gazit, voidspace, Tom Christie, hjwp2, Adam Nelson, Jannis Leidel, Anssi Kääriäinen, Preston Holmes, Bruno Renié and Jacob Kaplan-Moss. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://code.djangoproject.com/svn/django/trunk@17241 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/internals/contributing/writing-code/unit-tests.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'docs/internals/contributing/writing-code') diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt index 5ec09fe84c..275ee154f6 100644 --- a/docs/internals/contributing/writing-code/unit-tests.txt +++ b/docs/internals/contributing/writing-code/unit-tests.txt @@ -122,6 +122,19 @@ Going beyond that, you can specify an individual test method like this: ./runtests.py --settings=path.to.settings i18n.TranslationTests.test_lazy_objects +Running the Selenium tests +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some admin tests require Selenium 2, Firefox and Python >= 2.6 to work via a +real Web browser. To allow those tests to run and not be skipped, you must +install the selenium_ package (version > 2.13) into your Python path. + +Then, run the tests normally, for example: + +.. code-block:: bash + + ./runtests.py --settings=test_sqlite admin_inlines + Running all the tests ~~~~~~~~~~~~~~~~~~~~~ @@ -135,6 +148,7 @@ dependencies: * setuptools_ * memcached_, plus a :ref:`supported Python binding ` * gettext_ (:ref:`gettext_on_windows`) +* selenium_ (if also using Python >= 2.6) If you want to test the memcached cache backend, you'll also need to define a :setting:`CACHES` setting that points at your memcached instance. @@ -149,6 +163,7 @@ associated tests will be skipped. .. _setuptools: http://pypi.python.org/pypi/setuptools/ .. _memcached: http://www.danga.com/memcached/ .. _gettext: http://www.gnu.org/software/gettext/manual/gettext.html +.. _selenium: http://pypi.python.org/pypi/selenium .. _contrib-apps: -- cgit v1.3