Giter VIP home page Giter VIP logo

deformdemo's Introduction

Deform Demo

Demonstration application for the Deform Python HTML form library. Please see http://deformdemo.repoze.org for a running version of this application.

Running the Demo

  • Create a virtualenv:

    $ virtualenv2.7 --no-site-packages /path/to/my/venv
    

    Hereafter /path/to/my/venv will be referred to as $VENV in steps below.

  • Get a checkout of deformdemo:

    $ git clone git://github.com/Pylons/deformdemo.git
    
  • cd to the newly checked out deformdemo package:

    $ cd deformdemo
    
  • Run setup.py dev using the virtualenv's python command:

    $ $VENV/bin/python setup.py dev
    
  • While your working directory is still deformdemo, start the demo application:

    $ $VENV/bin/pserve demo.ini
    
  • Visit http://localhost:8522 in a browser to see the demo.

Running the Demo's Selenium Tests

The deformdemo application serves as a target for functional testing during Deform's development. A suite of Selenium tests may be run against a local instance of the demonstration application. It is wise to run these tests before submitting a patch. Here's how:

  • Start the deformdemo application as described above in "Running the Demo". Leave the terminal window running this application open, and open another terminal window to perform the below steps.

  • In the other terminal window, cd to the "deformdemo" checkout directory you created above in "Running the Demo":

    $ cd /path/to/my/deformdemo/checkout
    
  • Run the tests:

    $ $VENV/bin/nosetests
    

    $VENV is defined as it was in "Running the Demo" above.

  • You will (hopefully) see Firefox pop up and it will begin to display in quick succession the loading of pages in the bottom window and some test output in the top window. The tests will run for five or ten minutes.

  • Test success means that the console window on which you ran nosetests shows a bunch of dots, a test summary, then OK. If it shows a traceback, FAILED, or anything other than a straight line of dots, it means there was an error.

  • Fix any errors by modifying your code or by modifying the tests to expect the changes you've made.

Testing an Alternate Renderer Implementation

  • Copy the demo.ini file from this demo package to your renderer's package.
  • Change the deform.renderer key in the demo.ini copy to point at your renderer (it's a Python dotted name).
  • Run pserve /path/to/your/copy/of/demo.ini.
  • Run the selenium tests as above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.