Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 85 lines (54 sloc) 2.654 kb
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
1 Deform Demo
2 ===========
75eebe3 @mcdonc Add in-progress formgen package.
mcdonc authored
3
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
4 Demonstration application for the `Deform
5 <http://docs.pylonsproject.org/projects/deform/dev/>`_ Python HTML form
d3665ca @davidjb Fix incorrect demo link in README
davidjb authored
6 library. Please see http://deformdemo.repoze.org for a running version
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
7 of this application.
8
9 Running the Demo
10 ----------------
11
12 - Create a virtualenv::
13
ee8f3cf @domenkozar advise to use python 2.7
domenkozar authored
14 $ virtualenv2.7 --no-site-packages /path/to/my/venv
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
15
16 Hereafter ``/path/to/my/venv`` will be referred to as $VENV in steps
17 below.
18
19 - Get a checkout of deformdemo::
20
21 $ git clone git://github.com/Pylons/deformdemo.git
22
23 - ``cd`` to the newly checked out deformdemo package::
24
784f524 @mcdonc typos
mcdonc authored
25 $ cd deformdemo
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
26
53a8da9 @domenkozar add nose as dependency and advise to use it for running tests
domenkozar authored
27 - Run ``setup.py dev`` using the virtualenv's ``python`` command::
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
28
53a8da9 @domenkozar add nose as dependency and advise to use it for running tests
domenkozar authored
29 $ $VENV/bin/python setup.py dev
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
30
31 - While your working directory is still ``deformdemo``, start the demo
32 application::
33
e4d5b65 @reedobrien use waitress
reedobrien authored
34 $ $VENV/bin/pserve demo.ini
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
35
ef2499d @mcdonc merge deform2 branch to master
mcdonc authored
36 - Visit http://localhost:8522 in a browser to see the demo.
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
37
38 Running the Demo's Selenium Tests
39 ---------------------------------
40
41 The ``deformdemo`` application serves as a target for functional
42 testing during Deform's development. A suite of Selenium tests may be
43 run against a local instance of the demonstration application. It is
44 wise to run these tests before submitting a patch. Here's how:
45
46 - Start the ``deformdemo`` application as described above in "Running
47 the Demo". Leave the terminal window running this application open,
48 and open another terminal window to perform the below steps.
49
12bcdef @mcdonc fix instructions to not start selenium server
mcdonc authored
50 - In the other terminal window, cd to the "deformdemo" checkout directory
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
51 you created above in "Running the Demo"::
52
53 $ cd /path/to/my/deformdemo/checkout
54
55 - Run the tests::
56
53a8da9 @domenkozar add nose as dependency and advise to use it for running tests
domenkozar authored
57 $ $VENV/bin/nosetests
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
58
59 ``$VENV`` is defined as it was in "Running the Demo" above.
60
12bcdef @mcdonc fix instructions to not start selenium server
mcdonc authored
61 - You will (hopefully) see Firefox pop up and it will begin to display in quick
62 succession the loading of pages in the bottom window and some test output in
63 the top window. The tests will run for five or ten minutes.
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
64
65 - Test success means that the console window on which you ran
12bcdef @mcdonc fix instructions to not start selenium server
mcdonc authored
66 ``nosetests`` shows a bunch of dots, a test summary, then ``OK``. If
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
67 it shows a traceback, ``FAILED``, or anything other than a straight
68 line of dots, it means there was an error.
69
70 - Fix any errors by modifying your code or by modifying the tests to
71 expect the changes you've made.
72
73 Testing an Alternate Renderer Implementation
74 --------------------------------------------
75
76 - Copy the ``demo.ini`` file from this demo package to your renderer's
77 package.
78
79 - Change the ``deform.renderer`` key in the ``demo.ini`` copy to point at
80 your renderer (it's a Python dotted name).
81
e4d5b65 @reedobrien use waitress
reedobrien authored
82 - Run ``pserve /path/to/your/copy/of/demo.ini``.
bec56f8 @mcdonc first cut at separating deformdemo from deform itself
mcdonc authored
83
84 - Run the selenium tests as above.
Something went wrong with that request. Please try again.