{ "info": { "author": "Santiago Suarez Ordonez", "author_email": "santiycr@rcom.com.ar", "bugtrack_url": null, "classifiers": [ "Framework :: Buildout", "Framework :: Plone", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Testing" ], "description": ".. contents::\r\n\r\n\r\n- Code repository: http://svn.rcom.com.ar/rcom.recipe.seleniumenv\r\n- Questions and comments to santiycr at rcom dot com dot ar\r\n- Report bugs at santiycr at rcom dot com dot ar\r\n\r\n\r\nDetailed Documentation\r\n**********************\r\n\r\n`Watch the screencast!\r\n`_\r\n\r\nSupported options\r\n=================\r\n\r\nThe recipe supports the following options:\r\n\r\nseleniumversion\r\n The version of selenium to use, the version numbers can be taken from\r\n http://release.seleniumhq.org/selenium-remote-control/. Default: nightlyBuild.\r\n\r\neggs\r\n The eggs to include in the runner path. Any product included in the path will be\r\n accessible for the runner to search and run selenium tests from.\r\n\r\njava-cmd\r\n The command used to run the selenium server. Default: java.\r\n\r\nExample usage\r\n=============\r\n\r\nThe basic buildout that uses the recipe should look like the following::\r\n\r\n >>> write('buildout.cfg',\r\n ... \"\"\"\r\n ... [buildout]\r\n ... parts = seleniumenv\r\n ...\r\n ... [seleniumenv]\r\n ... recipe = rcom.recipe.seleniumenv\r\n ... seleniumversion = 1.0-beta-2\r\n ... eggs = ${instance:eggs}\r\n\r\n\r\nThe seleniumrunner script\r\n=========================\r\n\r\nThe selenium runner is a script to find and run **selenium tests**, it will\r\nbe on your bin directory once the recipe is installed\r\nIt receives different parameters and it's main objective is to simplify the\r\ntests execution and reporting procedure.\r\nThis script will wake-up the selenium RC server, search and run the tests\r\nand then shutdown the server and report the tests result.\r\nOnce the recipe has been installed, a tests runner should be placed on the bin\r\ndirectory\r\n\r\nRunning the tests\r\n-----------------\r\n\r\nTo run the suite of tests bundled with any product, the first thing to do after\r\nthe buildout has been run is to prepare a Plone site to test (if the user\r\ndoesn't have a Plone site to test, yet).\r\nFor this to be done, you must first wake up the instance::\r\n\r\n ./bin/instance start\r\n\r\nTo run all the selenium tests for a product the user should pass at least two\r\nparameters:\r\n\r\n-i instance\r\n The Plone site's name.\r\n\r\n-s product\r\n The product in which the runner will search for tests to run.\r\n\r\nAn example test execution will be::\r\n\r\n $ ./bin/seleniumrunner -i testPloneSite -s namespace.product\r\n\r\nThis will search all the **selenium** tests for the product and run them\r\non http://localhost:/testPloneSite.\r\n\r\nFor running a particular test, the -t parameter should be passed to the runner::\r\n\r\n $ ./bin/seleniumrunner -i testPloneSite -s namespace.product -t exampleTest\r\n\r\n.. Note::\r\n\r\n Please notice that the exampleTest.py test should be stored in the\r\n respective location and added to the __init__py file (See `Creating a test`_)\r\n\r\nCreating a test\r\n---------------\r\n\r\nThe seleniumrunner script will look for all the classes that inherit from\r\nunittest.TestCase on a specified package or module located under this kind of\r\npath::\r\n\r\n namespace.product/namespace/product/tests/seleniumtests\r\n\r\nTests development guidelines\r\n++++++++++++++++++++++++++++\r\n\r\nTo create a test, there are certain basic rules to follow:\r\n\r\n#) The test should inherit from unittest.TestCase class (this can be done\r\n indirectly also).\r\n#) The test should use certain global variables for the code to work\r\n on different environments and Plone instances. These are:\r\n\r\n - browser: For the browser used for the tests\r\n\r\n - port: For the port used to communicate with the server\r\n\r\n - url: For the url of the application under test\r\n\r\n - instance: The Plone site name (this depends on\r\n the name used for the site's creation).\r\n\r\nThis variables should never be changed inside the test code, as the\r\nseleniumrunner script will set them at runtime according with the parameters\r\nreceived.\r\n\r\nAll this rules can be seen applied to the following `Example test`_.\r\n\r\nExample test\r\n++++++++++++\r\n\r\nThe following is an example test, it can be used as the basic\r\nstructure for future tests::\r\n\r\n from selenium import selenium\r\n import unittest\r\n\r\n class NewTest(unittest.TestCase):\r\n def setUp(self):\r\n self.verificationErrors = []\r\n self.selenium = selenium(\"localhost\", port, browser, url)\r\n self.selenium.start()\r\n \r\n def test_new(self):\r\n sel = self.selenium\r\n\t\t\t\tsel.open(instance + \"/login.html\")\r\n # Do specific tests in here\r\n\r\n def tearDown(self):\r\n self.selenium.stop()\r\n self.assertEqual([], self.verificationErrors)\r\n\r\nNotice that the test doesn't have much changes from the basic test exported using\r\n`Selenium IDE `_, the firefox extension. The \r\nonly difference are the variables used for the instantiation inside the *setUp*\r\nmethod.\r\n\r\n.. Note::\r\n\r\n Please notice that the \"instance\" variable will have to be used in\r\n each *open* command for the users to provide the correct location\r\n of the plone site to test.\r\n\r\nContributors\r\n************\r\n\r\nSantiago Suarez Ordo\u00f1ez, Author\r\nJuan Pablo Gimenez, Contributor\r\n\r\nChange history\r\n**************\r\n\r\n0.1 (2009-01-05)\r\n==================\r\n - Created recipe with ZopeSkel [Santiago Suarez Ordo\u00f1ez].\r\n\r\n1.0 (2009-02-14)\r\n==================\r\n - Ended code changes and uploaded the egg to pypi [Santiago Suarez Ordo\u00f1ez].\r\n\r\nDownload\r\n********\r\n\r\nhttp://pypi.python.org/packages/source/r/rcom.recipe.seleniumenv/rcom.recipe.seleniumenv-1.0dev-r4475.tar.gz#md5=a093a67c7fe5d9339856e0ebda88061e", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "www.santiycr.com.ar", "keywords": "selenium rc testing plone ajax recipe", "license": "ZPL", "maintainer": "", "maintainer_email": "", "name": "rcom.recipe.seleniumenv", "package_url": "https://pypi.org/project/rcom.recipe.seleniumenv/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/rcom.recipe.seleniumenv/", "project_urls": { "Download": "UNKNOWN", "Homepage": "www.santiycr.com.ar" }, "release_url": "https://pypi.org/project/rcom.recipe.seleniumenv/1.0/", "requires_dist": null, "requires_python": null, "summary": "A recipe for setting a ready-to-use selenium RC environment", "version": "1.0" }, "last_serial": 798586, "releases": { "0.1dev-r4475": [ { "comment_text": "", "digests": { "md5": "cd9c5af4324d8280cb3d00d7114e7521", "sha256": "83313a6786d065a223e6d70bfc67b5b4899174441e828ed4c3cbfe3e1e82548d" }, "downloads": -1, "filename": "rcom.recipe.seleniumenv-0.1dev_r4475-py2.5.egg", "has_sig": false, "md5_digest": "cd9c5af4324d8280cb3d00d7114e7521", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 29819, "upload_time": "2009-02-14T19:02:47", "url": "https://files.pythonhosted.org/packages/3c/6b/454962e5743a6e8d349aa2e39962245568904fd002b737301e1722507b14/rcom.recipe.seleniumenv-0.1dev_r4475-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "e143026aed7f84cc1f5e921ac9be1f34", "sha256": "4fbd03925d790ce6967aa59b9d9caf9fde9f920dfb5fc7bb5ab6f2d38694bc11" }, "downloads": -1, "filename": "rcom.recipe.seleniumenv-0.1dev-r4475.tar.gz", "has_sig": false, "md5_digest": "e143026aed7f84cc1f5e921ac9be1f34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14312, "upload_time": "2009-02-14T19:02:34", "url": "https://files.pythonhosted.org/packages/6d/e2/79c9b57f81e46ebc4f4d757cb3b38e4e8a6a18b4f341de370360e66b083f/rcom.recipe.seleniumenv-0.1dev-r4475.tar.gz" } ], "1.0": [], "1.0dev-r4475": [ { "comment_text": "", "digests": { "md5": "368d8d1a36b2aa6f395ae5118f1fef47", "sha256": "a532cf78a9fc45b01357b8620915a5c272237789a9fca8b94437146e3318044a" }, "downloads": -1, "filename": "rcom.recipe.seleniumenv-1.0dev_r4475-py2.5.egg", "has_sig": false, "md5_digest": "368d8d1a36b2aa6f395ae5118f1fef47", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 31998, "upload_time": "2009-02-14T20:46:48", "url": "https://files.pythonhosted.org/packages/27/c4/2668ed585622ac0829add3a872e0bd4ba38e8323c3abe833a38a5654695d/rcom.recipe.seleniumenv-1.0dev_r4475-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "a093a67c7fe5d9339856e0ebda88061e", "sha256": "969dd6ce227af82e933b41f506ea3c4aa332ab97685d92e2f2997e0ad9519b6f" }, "downloads": -1, "filename": "rcom.recipe.seleniumenv-1.0dev-r4475.tar.gz", "has_sig": false, "md5_digest": "a093a67c7fe5d9339856e0ebda88061e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15421, "upload_time": "2009-02-14T20:46:40", "url": "https://files.pythonhosted.org/packages/84/e1/f0de8aca8f5c364d02e00adc36b2352011a620ba15b3411aae71cdcba41e/rcom.recipe.seleniumenv-1.0dev-r4475.tar.gz" } ] }, "urls": [] }