{"id":16632702,"url":"https://github.com/kitconcept/robotframework-djangolibrary","last_synced_at":"2025-07-12T22:33:57.558Z","repository":{"id":13708846,"uuid":"16402796","full_name":"kitconcept/robotframework-djangolibrary","owner":"kitconcept","description":"A Robot Framework library for Django.","archived":false,"fork":false,"pushed_at":"2021-07-15T02:21:46.000Z","size":504,"stargazers_count":40,"open_issues_count":11,"forks_count":20,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-03T20:47:17.227Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kitconcept.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-31T08:05:39.000Z","updated_at":"2025-03-21T08:11:15.000Z","dependencies_parsed_at":"2022-09-01T20:41:48.838Z","dependency_job_id":null,"html_url":"https://github.com/kitconcept/robotframework-djangolibrary","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/kitconcept/robotframework-djangolibrary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitconcept%2Frobotframework-djangolibrary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitconcept%2Frobotframework-djangolibrary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitconcept%2Frobotframework-djangolibrary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitconcept%2Frobotframework-djangolibrary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kitconcept","download_url":"https://codeload.github.com/kitconcept/robotframework-djangolibrary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitconcept%2Frobotframework-djangolibrary/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265066119,"owners_count":23706062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T05:09:53.082Z","updated_at":"2025-07-12T22:33:57.529Z","avatar_url":"https://github.com/kitconcept.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==============================================================================\nA robot framework library for Django.\n==============================================================================\n\n.. image:: https://travis-ci.org/kitconcept/robotframework-djangolibrary.svg?branch=master\n    :target: https://travis-ci.org/kitconcept/robotframework-djangolibrary\n\n.. image:: https://img.shields.io/pypi/status/robotframework-djangolibrary.svg\n    :target: https://pypi.python.org/pypi/robotframework-djangolibrary/\n    :alt: Egg Status\n\n.. image:: https://img.shields.io/pypi/v/robotframework-djangolibrary.svg\n    :target: https://pypi.python.org/pypi/robotframework-djangolibrary/\n    :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/l/robotframework-djangolibrary.svg\n    :target: https://pypi.python.org/pypi/robotframework-djangolibrary/\n    :alt: License\n\n|\n\n.. image:: https://raw.githubusercontent.com/kitconcept/robotframework-djangolibrary/master/kitconcept.png\n   :alt: kitconcept\n   :target: https://kitconcept.com/\n\n\nIntroduction\n------------\n\nDjangoLibrary is a web testing library to test Django with Robot Framework.\nIt uses SeleniumLibrary to run tests against a real browser instance.\n\nThe library will automatically start and stop your Django instance while running the tests.\nIt 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.\n\nDjangoLibrary is currently tested against Django 1.8.x, 1.9.x, 1.11.x with SQLite and Postgres on Python 2.7 and 3.6.\n\n\nDocumentation\n-------------\n\n`Robot Framework Django Library Keyword Documentation`_\n\n\nInstallation\n------------\n\nInstall robotframework-djangolibrary with pip::\n\n  $ pip install robotframework-djangolibrary\n\nIn order to be able to use DjangoLibrary's `Autologin`, `FactoryBoy`, or\n`QuerySet` keywords you have to add the corresponding middleware classes to\nyour MIDDLEWARE_CLASSES in yoursettings.py::\n\n  MIDDLEWARE_CLASSES = (\n      ...\n      'django.contrib.auth.middleware.AuthenticationMiddleware',\n      'DjangoLibrary.middleware.AutologinAuthenticationMiddleware',\n      'DjangoLibrary.middleware.FactoryBoyMiddleware',\n      'DjangoLibrary.middleware.QuerySetMiddleware',\n  )\n\n.. DANGER::\n   Make sure that you add those middlewares only to your test setup and\n   NEVER to your deployment! The Autologin middleware just checks for a\n   'autologin' cookie and then authenticates and login ANY user.\n\n\nFirst Robot Test\n----------------\n\nIn order to write your first robot test, make sure that you include SeleniumLibrary and DjangoLibrary. Create a test.robot file with the\nfollowing content::\n\n  *** Variables ***\n\n  ${HOSTNAME}             127.0.0.1\n  ${PORT}                 55001\n  ${SERVER}               http://${HOSTNAME}:${PORT}/\n  ${BROWSER}              firefox\n\n\n  *** Settings ***\n\n  Documentation   Django Robot Tests\n  Library         SeleniumLibrary  timeout=10  implicit_wait=0\n  Library         DjangoLibrary  ${HOSTNAME}  ${PORT}  path=mysite/mysite  manage=mysite/manage.py  settings=mysite.settings\n  Suite Setup     Start Django and open Browser\n  Suite Teardown  Stop Django and close Browser\n\n\n  *** Keywords ***\n\n  Start Django and open Browser\n    Start Django\n    Open Browser  ${SERVER}  ${BROWSER}\n\n  Stop Django and close browser\n    Close Browser\n    Stop Django\n\n\n  *** Test Cases ***\n\n  Scenario: As a visitor I can visit the django default page\n    Go To  ${SERVER}\n    Wait until page contains element  id=explanation\n    Page Should Contain  It worked!\n    Page Should Contain  Congratulations on your first Django-powered page.\n\n\nLicense\n-------\n\nCopyright kitconcept GmbH.\n\nDistributed under the terms of the Apache License 2.0, robotframework-djangolibrary is free and Open Source software.\n\n\nContribute\n----------\n\n- `Source code at Github \u003chttps://github.com/kitconcept/robotframework-djangolibrary\u003e`_\n- `Issue tracker at Github \u003chttps://github.com/kitconcept/robotframework-djangolibrary/issues\u003e`_\n\n\nSupport\n-------\n\nIf you are having issues, `please let us know \u003chttps://github.com/kitconcept/robotframework-djangolibrary/issues\u003e`_. If you require professional support feel free to contact us at `info@kitconcept.com. \u003cmailto:info@kitconcept.com\u003e`_\n\n\nRun Tests\n---------\n\nThen you can run the test with robot::\n\n  $ robot test.robot\n\nThe output should look like this::\n\n  ==============================================================================\n  Test :: Django Robot Tests\n  ==============================================================================\n  Scenario: As a visitor I can visit the django default page            | PASS |\n  ------------------------------------------------------------------------------\n  Test :: Django Robot Tests                                            | PASS |\n  1 critical test, 1 passed, 0 failed\n  1 test total, 1 passed, 0 failed\n  ==============================================================================\n  Output:  /home/timo/workspace/prounix/robotframework-djangolibrary/output.xml\n  Log:     /home/timo/workspace/prounix/robotframework-djangolibrary/log.html\n  Report:  /home/timo/workspace/prounix/robotframework-djangolibrary/report.html\n\n\nTest Isolation\n--------------\n\nrobotframework-djangolibrary does not provide isolation between tests by\ndefault. This means if you add an object to the database in a test, this\nobject will be present in the next test as well. You need to cleanup\nyourself in order to have a proper isolation between the tests. You can use\nthe robotframework \"Test Teardown\" call to call the \"Clear DB\" keyword after\neach test::\n\n  *** Settings ***\n\n  Library         SeleniumLibrary  timeout=10  implicit_wait=0\n  Library         DjangoLibrary  ${HOSTNAME}  ${PORT}  path=mysite/mysite  manage=mysite/manage.py  settings=mysite.settings  db=mysite/db.sqlite3\n  Suite Setup     Start Django and open Browser\n  Suite Teardown  Stop Django and close Browser\n  Test Teardown   Clear DB\n\n\nDevelopment\n-----------\n\nCheckout repository from github::\n\n  $ git clone https://github.com/kitconcept/robotframework-djangolibrary.git\n\nCreate a virtual Python environment::\n\n  $ cd robotframework-djangolibrary/\n  $ virtualenv .py27\n  $ source .py27/bin/activate\n\nInstall robotframework-djangolibrary in development mode::\n\n  $ python setup.py develop\n\nInstall the requirements::\n\n  $ pip install -r requirements.txt\n\nRun Unit/Integration-Tests::\n\n  $ py.test mysite/\n\nRun Acceptance Tests::\n\n  $ robot DjangoLibrary/tests/\n\n.. _`Robot Framework Django Library Keyword Documentation`: https://kitconcept.github.io/robotframework-djangolibrary/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitconcept%2Frobotframework-djangolibrary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitconcept%2Frobotframework-djangolibrary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitconcept%2Frobotframework-djangolibrary/lists"}