{ "info": { "author": "Victor Fernandez de Alba", "author_email": "sneridagh@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Pyramid", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application" ], "description": "Pyramid testing with RobotFramework\n===================================\n\nSo finally, Pyramid got its Robot.\n\nThis is a convenience package to enable Robot Framework tests in Pyramid. Robot\nFramework is a generic test automation framework for acceptance testing and\nacceptance test-driven development (ATDD) arround Selenium2. It puts all\ntogether Asko Soukka's robotsuite that enables seamless integration of\nRobotframework with unittest and WebTest HTTP client/server utilities.\n\nAs robotsuite works with a plone.testing layer, we need to setup one in the test\nboilerplate. This is because robotsuite was originally designed to work with\nPlone testing framework, however we've completelly detached from it by including\na mean to create a testing layer as robotsuite expects.\n\nJust setup your tests boilerplate like::\n\n import os\n import robotsuite\n import unittest\n from webtest import http\n from paste.deploy import loadapp\n\n from pyramid_robot.layer import Layer, layered\n\n\n class myPyramidLayer(Layer):\n\n defaultBases = ()\n\n def setUp(self):\n conf_dir = os.path.dirname(__file__)\n app = loadapp('config:test.ini', relative_to=conf_dir)\n self.server = http.StopableWSGIServer.create(app, port=8080)\n\n def tearDown(self):\n self.server.shutdown()\n\n PYRAMIDROBOTLAYER = myPyramidLayer()\n\nYou should provide a valid paste deploy ``.ini`` file for initialize your app under\ntest. This can be similar to the one you use to run your app, customized for\nyour testing needs. The boilerplate looks for this file in the test folder. Then\nwe will create a server listening to the specified port. See WebTest\ndocumentation for additional customization.\n\nThen we define our test suite like::\n\n def test_suite():\n suite = unittest.TestSuite()\n current_dir = os.path.abspath(os.path.dirname(__file__))\n robot_dir = os.path.join(current_dir, 'robot')\n robot_tests = [\n os.path.join('robot', doc) for doc in\n os.listdir(robot_dir) if doc.endswith('.robot') and\n doc.startswith('test_')\n ]\n for test in robot_tests:\n suite.addTests([\n layered(robotsuite.RobotTestSuite(test),\n layer=PYRAMIDROBOTLAYER),\n ])\n return suite\n\nThis will prepare the suite and will search for any file with the extension\n``.robot`` inside the **robot** folder inside the test folder.\n\nExamples\n--------\nYou can find a very simple test app, a fixture and a sample robot test in the\ntest folder.\n\nDrawbacks\n---------\nCall it a drawback, I call it a feature ;)\n\nYou can only run the tests using ``zope.testing.testrunner``, otherwise they\nwill get ignored. I think it would be also be possible to use other test runner\nlike ``nose``, contributions are welcomed.\n\nYou can setup easily a ``zc.buildout`` enviroment with the\n``zope.testing.testrunner`` like the one included in the root package. Just do::\n\n $ python bootstrap.py\n $ ./bin/buildout\n\nand then, to be able to run the example tests::\n\n $ ./bin/test\n\nDocumentation\n-------------\nSee RobotFramework documentation for resources on how to use it:\n\nhttp://code.google.com/p/robotframework/\n\nhttp://code.google.com/p/robotframework/wiki/HowToWriteGoodTestCases\n\nhttp://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.html?r=2.7.6\n\nhttp://robotframework.googlecode.com/hg/doc/libraries/BuiltIn.html?r=2.7.6\n\nhttp://rtomac.github.com/robotframework-selenium2library/doc/Selenium2Library.html\n\n\nChangelog\n=========\n\n1.1 (2015-08-31)\n----------------\n\n- Added Python 3.4 support.\n\n\n1.0 (2013-07-02)\n----------------\n\n- Initial version", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sneridagh/pyramid_robot", "keywords": "web pyramid pylons test robotframework robot selenium", "license": null, "maintainer": null, "maintainer_email": null, "name": "pyramid_robot", "package_url": "https://pypi.org/project/pyramid_robot/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyramid_robot/", "project_urls": { "Homepage": "https://github.com/sneridagh/pyramid_robot" }, "release_url": "https://pypi.org/project/pyramid_robot/1.1/", "requires_dist": null, "requires_python": null, "summary": "Convenience package for enable RobotFramework tests under Pyramid.", "version": "1.1" }, "last_serial": 1701160, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "7cdefe0b6c5844997cb1491a3e94c355", "sha256": "41f61f69bbab3d500414653d40da66c2c8e022fb166b94ae540af685044f9ddb" }, "downloads": -1, "filename": "pyramid_robot-1.0.zip", "has_sig": false, "md5_digest": "7cdefe0b6c5844997cb1491a3e94c355", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15701, "upload_time": "2013-07-02T20:51:30", "url": "https://files.pythonhosted.org/packages/b1/ac/5a0caa4204368096aa4d4e3ab32114044c109c7dfd09698a6e96706fd672/pyramid_robot-1.0.zip" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "b6fc7fee4ae8ed6bb6fed526631d0bf0", "sha256": "e27fd75272f7d7daa9c2501470708bbb3429534600291a003de02671c5eac089" }, "downloads": -1, "filename": "pyramid_robot-1.1.tar.gz", "has_sig": false, "md5_digest": "b6fc7fee4ae8ed6bb6fed526631d0bf0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6876, "upload_time": "2015-08-31T08:09:00", "url": "https://files.pythonhosted.org/packages/f7/59/6adb1acff1cba73067e82f53a2da8758754a4b4c1a02d3f5b4f8be48b43d/pyramid_robot-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b6fc7fee4ae8ed6bb6fed526631d0bf0", "sha256": "e27fd75272f7d7daa9c2501470708bbb3429534600291a003de02671c5eac089" }, "downloads": -1, "filename": "pyramid_robot-1.1.tar.gz", "has_sig": false, "md5_digest": "b6fc7fee4ae8ed6bb6fed526631d0bf0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6876, "upload_time": "2015-08-31T08:09:00", "url": "https://files.pythonhosted.org/packages/f7/59/6adb1acff1cba73067e82f53a2da8758754a4b4c1a02d3f5b4f8be48b43d/pyramid_robot-1.1.tar.gz" } ] }