Metadata-Version: 1.1
Name: robotframework-djangolibrary
Version: 1.0a5
Summary: A robot framework library for Django.
Home-page: http://kitconcept.com
Author: Timo Stollenwerk
Author-email: stollenwerk@kitconcept.com
License: Apache License 2.0
Description: ==============================================================================
        A robot framework library for Django.
        ==============================================================================
        
        .. image:: https://travis-ci.org/kitconcept/robotframework-djangolibrary.svg?branch=master
            :target: https://travis-ci.org/kitconcept/robotframework-djangolibrary
        
        .. image:: https://img.shields.io/pypi/dm/robotframework-djangolibrary.svg
            :target: https://pypi.python.org/pypi/robotframework-djangolibrary/
            :alt: Downloads
        
        .. image:: https://img.shields.io/pypi/v/robotframework-djangolibrary.svg
            :target: https://pypi.python.org/pypi/robotframework-djangolibrary/
            :alt: Latest Version
        
        .. image:: https://img.shields.io/pypi/status/robotframework-djangolibrary.svg
            :target: https://pypi.python.org/pypi/robotframework-djangolibrary/
            :alt: Egg Status
        
        .. image:: https://img.shields.io/pypi/l/robotframework-djangolibrary.svg
            :target: https://pypi.python.org/pypi/robotframework-djangolibrary/
            :alt: License
        
        
        Introduction
        ------------
        
        DjangoLibrary is a web testing library to test Django with Robot Framework. It uses Selenium2Library to run tests against a real browser instance.
        
        The library will automatically start and stop your Django instance while running the tests. It also comes with serveral autologin keywords that allow you to login different users during your tests, without the need to actually access the login page.
        
        
        Documentation
        -------------
        
        `Robot Framework Django Library Keyword Documentation`_
        
        Installation
        ------------
        
        robotframework-djangolibrary is still in alpha, therefore you have to use '--pre' to install it with pip::
        
          $ pip install --pre robotframework-djangolibrary
        
        In order to be able to use DjangoLibrary's autologin keywords you have to add
        the AutologinAuthenticationMiddleware to your MIDDLEWARE_CLASSES in your
        settings.py::
        
          MIDDLEWARE_CLASSES = (
              ...
              'django.contrib.auth.middleware.AuthenticationMiddleware',
              'DjangoLibrary.middleware.AutologinAuthenticationMiddleware',
          )
        
        .. DANGER::
           Make sure that you add this middleware only to your test setup and
           NEVER to your deployment! The middleware just checks for a 'autologin'
           cookie and then authenticates and login ANY user.
        
        
        First Robot Test
        ----------------
        
        In order to write your first robot test, make sure that you include Selenium2Library and DjangoLibrary. Create a test.robot file with the
        following content::
        
          *** Variables ***
        
          ${HOSTNAME}             127.0.0.1
          ${PORT}                 55001
          ${SERVER}               http://${HOSTNAME}:${PORT}/
          ${BROWSER}              firefox
        
        
          *** Settings ***
        
          Documentation   Django Robot Tests
          Library         Selenium2Library  timeout=10  implicit_wait=0
          Library         DjangoLibrary  ${HOSTNAME}  ${PORT}  path=mysite/mysite  manage=mysite/manage.py  settings=mysite.settings  db=mysite/db.sqlite3
          Suite Setup     Start Django and open Browser
          Suite Teardown  Stop Django and close Browser
        
        
          *** Keywords ***
        
          Start Django and open Browser
            Start Django
            Open Browser  ${SERVER}  ${BROWSER}
        
          Stop Django and close browser
            Close Browser
            Stop Django
        
        
          *** Test Cases ***
        
          Scenario: As a visitor I can visit the django default page
            Go To  ${SERVER}
            Wait until page contains element  id=explanation
            Page Should Contain  It worked!
            Page Should Contain  Congratulations on your first Django-powered page.
        
        
        Run Tests
        ---------
        
        Then you can run the test with pybot::
        
          $ pybot test.robot
        
        The output should look like this::
        
          ==============================================================================
          Test :: Django Robot Tests
          ==============================================================================
          Scenario: As a visitor I can visit the django default page            | PASS |
          ------------------------------------------------------------------------------
          Test :: Django Robot Tests                                            | PASS |
          1 critical test, 1 passed, 0 failed
          1 test total, 1 passed, 0 failed
          ==============================================================================
          Output:  /home/timo/workspace/prounix/robotframework-djangolibrary/output.xml
          Log:     /home/timo/workspace/prounix/robotframework-djangolibrary/log.html
          Report:  /home/timo/workspace/prounix/robotframework-djangolibrary/report.html
        
        
        Development
        -----------
        
        Checkout repository from github::
        
          $ git clone https://github.com/kitconcept/robotframework-djangolibrary.git
        
        Create a virtual Python environment::
        
          $ cd robotframework-djangolibrary/
          $ virtualenv .env
          $ source .env/bin/activate
        
        Install robotframework-djangolibrary in development mode::
        
          $ python setup.py develop
        
        Install the requirements::
        
          $ pip install -r requirements.txt
        
        Run robotframework-djangolibrary tests::
        
          $ pybot DjangoLibrary/tests/
        
        
        .. _`Robot Framework Django Library Keyword Documentation`: https://kitconcept.github.io/robotframework-djangolibrary/DjangoLibraryDocs.html
        
        
        
        1.0a5 (2016-02-11)
        ------------------
        
        - Make middleware part Python 3 compatible.
        
          robotframework-djangolibrary is still not compatible with Python 3 because
          robotframework-selenium2library does not work with Python 3 yet. Though, you
          can install robotframwork-djangolibrary on Python 3 with "pip install
          robotframework-djangolibrary --no-deps" and then run your tests with
          Python 2.7.
          [timo]
        
        - Add 'Framework :: Robot Framework' classifier to setup.py.
          [timo]
        
        
        1.0a4 (2016-02-05)
        ------------------
        
        - Use 'migrate' instead of 'syncdb' for Django > 1.7.x.
          [timo]
        
        
        1.0a3 (2015-09-28)
        ------------------
        
        - Add list_classifiers to setup.py.
          [timo]
        
        - Fix user creation and startup. This fixes #3.
          [MatthewWilkes]
        
        
        1.0a2 (2015-06-25)
        ------------------
        
        - Remove Django and zest.releaser from requirements.txt. This fixes #2.
          [timo]
        
        
        1.0a1 (2015-06-24)
        ------------------
        
        - Initial release.
          [timo]
        
        
Keywords: robotframework django test
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Environment :: Web Environment
Classifier: Framework :: Robot Framework
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.5
Classifier: Framework :: Django :: 1.6
Classifier: Framework :: Django :: 1.7
Classifier: Framework :: Django :: 1.8
Classifier: Framework :: Django :: 1.9
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: Implementation :: CPython
