{ "info": { "author": "Simon Lindberg", "author_email": "lindberg.simon@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Pytest", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Pytest-Orchestration\n\nPytest-Orchestration is configuration driven test orchestration plugin, designed with the intention of being used for performance tests, however it might fit other purposes as well.\n\n## Installation\n```\npip install pytest-orchestration\n```\n\n## Configuration/Description\n\nThe configuration describing the orchestrated tests has the form of a .json file.\nWhere these files live is defined in the pytest.ini under \"orchestration_descriptions\". Note that the name of the file should match the `test_name` key in the file as well.\n```\n[pytest]\norchestration_descriptions = orchestration/descriptions/\n```\nBelow is an example config with comments:\n```\n{\n \"test_name\": \"my_orchestration_test\", // Name of the test (no need to have a \"test\" prefix or suffix)\n \"total_hours\": 3, // Total number of hours for the test to run\n \"unref_setup_fixtures\": [\"device_with_collectd\"], // A list of setup fixtures that won't be references in actual test events\n \"events\": [ // A list of all \"events\" making up the test\n {\n \"name\": \"start_playback\", // Mandatory: The name of the event as it is implemented, see Events section below\n \"interval_sec\": 300, // Optional: The number of seconds between eache execution of this event. If it is not set, then the event will only be triggerd according to \"at_startup\" and \"at_teardown\"\n \"at_startup\": true, // Optional(Defaults to true): Specifies if the event should be executed once on startup, if false it will wait interval_sec befor being executed.\n \"at_teardown\": false, // Optional(Defaults to false): Specifies if a event should be executed on teardown, one last time after the time \"total_hours\" have been reached.\n \"params\":{ // Optional: Params is a dict of simple key: values that would be used in the implemented events\n \"video_path\": \"/home/orch-tests/video-files/high_res_clip.mp4\"\n }\n },\n {\n \"name\": \"start_streamer\",\n \"at_startup\": true\n },\n {\n \"name\": \"collect_system_report\",\n \"at_startup\": false,\n \"at_teardown\": true\n }\n ]\n}\n```\n\n## Events\nEvents are what make up the orchestrated test. From the configuration example above we have 3 event; `start_playback`, `start_streamer` and `collect_system_report`. Each of these events needs to have an corresponding function. Where these functions live is specified in pytest.ini under `orchestration_sources` and can be a comma(',') separated list of files.\n```\n[pytest]\norchestration_sources = tests/event_plugin.py, somethingelse.py\n```\n\nThese events implementations can use any existing pytest fixture as parameter, as well as any parameter defined in the configuration/description, see \"video_path\" in configuration example above.\n\nSee an actual event implementation of `start_playback` from configuration example above.\nIt's input parameters are:\n* \"video_player\" - An already existing fixture we are reusing in our event\n* \"video_path\" - An input defined from our configuration/description file\n* \"kill_switch\" - The provided kill_switch fixture, we send it in you play method since it will start a subprocess which orchestration can not stop on it's own, so through the kill_switch we signal it and it has to take care of stopping itself.\n* \"result_reporter\" - We pass in the result_reporter so the play method can add its info/error whatever that orchestration then will monitor and execute on_result() when there is something new reported\n```\ndef start_playback(video_player, video_path, kill_switch, result_reporter):\n video_player.play(video_path, kill_switch, result_reporter)\n```\n\n## Reporter\nReporter is a class provided that the orchestration is using to collect reports/result/info from all its orchestrated events. An implemented event can use the `result_reporter()` fixture to get the instance. The reporter has 2 main methods worth noticing; ``monitor()`` and ``on_result()``. The monitor method will be running in the background of the ``orchestration`` and monitor the Queue object it contains for new info, if it finds something then ``on_result()`` will be called which will pop the info and log it. It is possible to implement your own Reporter class by inheriting from provided ResultReporter class and implementing your own ``on_result()`` method. If you implement this you also need to override the ``result_reporter(report_queue)`` fixture and make it return your reporter instead.\n\n## Fixtures\nThe plugin comes with a few fixture helpers, these are:\n* kill_switch() - Gives you a `multiprocessing.Event()` which will be set when tests finishes, so your event can know when test has ended and tear itself down properly.\n* result_reporter() - Facilitates a way to collect and report what is important from your events, see Reporter section.\n* report_queue() - Fixture which returns a thread safe `multiprocessing.Manager().Queue()` object which is injected into result_reporter, could be overridden as well.\n\n\n## Usage\n\nTo run a orchestration test you just need to specify --run-orch= where orch_name should be the name of the description configuration file excluding its extension.\n```\npytest --test-orch=my_orchestration_test\n```\n\nThe option `--load-orch` is also available, specifying this will load all events. This is mostly meant for testing.\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/simlind/pytest-orchestration", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pytest-orchestration", "package_url": "https://pypi.org/project/pytest-orchestration/", "platform": "", "project_url": "https://pypi.org/project/pytest-orchestration/", "project_urls": { "Homepage": "https://github.com/simlind/pytest-orchestration" }, "release_url": "https://pypi.org/project/pytest-orchestration/0.0.10/", "requires_dist": null, "requires_python": "", "summary": "A pytest plugin for orchestrating tests", "version": "0.0.10" }, "last_serial": 5549519, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "71f723b113809dc7a7a03ac917839014", "sha256": "c9276e04e97905f64974912442a712e58f42c7e7438195db25cf709d6a8a8c7c" }, "downloads": -1, "filename": "pytest_orchestration-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "71f723b113809dc7a7a03ac917839014", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8772, "upload_time": "2019-03-04T19:46:22", "url": "https://files.pythonhosted.org/packages/14/54/2148c5eaa57825dc4aa5fd118810367c5edd78bf46efc960fcb31bf2ef2a/pytest_orchestration-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "820581cfb64b32aef9cfe4585376f8cd", "sha256": "b646161e44129106b044e87d8ba2481eae4e98870be9df3d92939fbf0c03ef2c" }, "downloads": -1, "filename": "pytest-orchestration-0.0.1.tar.gz", "has_sig": false, "md5_digest": "820581cfb64b32aef9cfe4585376f8cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6895, "upload_time": "2019-03-04T19:46:25", "url": "https://files.pythonhosted.org/packages/7d/a0/3757c50b09377523cac327d833acd0bab658640033a7711830ebeb276d9c/pytest-orchestration-0.0.1.tar.gz" } ], "0.0.10": [ { "comment_text": "", "digests": { "md5": "914618b09cfb8e612bb65fb4e151873a", "sha256": "5128784e0dbd28017365fac709b1d51601ebe977c04d6e2cae18b7b3a380091e" }, "downloads": -1, "filename": "pytest_orchestration-0.0.10-py3-none-any.whl", "has_sig": false, "md5_digest": "914618b09cfb8e612bb65fb4e151873a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9474, "upload_time": "2019-07-18T07:34:05", "url": "https://files.pythonhosted.org/packages/aa/62/b5b2a4d0f75d4fbb338f63390667637c4eaad6f77167c1dc8c96100af9a0/pytest_orchestration-0.0.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1fddb4e7870349170a421d0a0aad4f48", "sha256": "5abccbfc9ca10f8833b1e4004370eec144ea235242a79d736a065c2b2379a0bc" }, "downloads": -1, "filename": "pytest-orchestration-0.0.10.tar.gz", "has_sig": false, "md5_digest": "1fddb4e7870349170a421d0a0aad4f48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8004, "upload_time": "2019-07-18T07:34:06", "url": "https://files.pythonhosted.org/packages/16/66/3bcbd7f974737dcab12d1425d133186c8dc6333baf58ef6a6314e5c4e5e2/pytest-orchestration-0.0.10.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "6d54f28ec80fbb3dc20c1e5a4fcdab49", "sha256": "4bfff36d6ae21fb5fb868c7ac6572afc93d4b9ded1fc0d45724ef37dc2d834ab" }, "downloads": -1, "filename": "pytest_orchestration-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "6d54f28ec80fbb3dc20c1e5a4fcdab49", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9121, "upload_time": "2019-03-07T12:44:07", "url": "https://files.pythonhosted.org/packages/b8/3f/761dac432ca5dc4773e0d905fbfc7fc1e485da175ee2e065b4d109abf78b/pytest_orchestration-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4cd1fdaadcd899db7f5fdd0d8a692f0f", "sha256": "908cfe66d6df7e84e30ac5df2b5a9333d0c3f57285d2b434fc3a8f35f73a17f5" }, "downloads": -1, "filename": "pytest-orchestration-0.0.3.tar.gz", "has_sig": false, "md5_digest": "4cd1fdaadcd899db7f5fdd0d8a692f0f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7212, "upload_time": "2019-03-07T12:44:09", "url": "https://files.pythonhosted.org/packages/4d/6f/5ab0415476da2c65a485aaf926908fb956c10da2bb6bd0f476e9c2fa34da/pytest-orchestration-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "c1aecb48f7e4311fbb3fb323e69ef2bd", "sha256": "d30242cee78bb075ded8a85f2444a60aee8e9ec2fdef2f404cf2c065e622c57a" }, "downloads": -1, "filename": "pytest_orchestration-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "c1aecb48f7e4311fbb3fb323e69ef2bd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9236, "upload_time": "2019-03-07T20:58:32", "url": "https://files.pythonhosted.org/packages/e2/ff/85bfc02265c4c3948ec74658d48e59fe77686bac567e89be7c49e39d1e14/pytest_orchestration-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "69cd5dc9cf365c1c3f827f587fb46e65", "sha256": "614caadb3a9ad7f85e6f7fbe271e2e9554387223c0dbcbe492aca702e6adacb0" }, "downloads": -1, "filename": "pytest-orchestration-0.0.4.tar.gz", "has_sig": false, "md5_digest": "69cd5dc9cf365c1c3f827f587fb46e65", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7798, "upload_time": "2019-03-07T20:58:33", "url": "https://files.pythonhosted.org/packages/0b/5b/2f60619c4ef37de969c40a614720190110024c76697866efc610f72d5d9a/pytest-orchestration-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "9dd1634b249d2563e5f9042f04643042", "sha256": "1bc14a549eac172f9d63e564287aeda1cd35724d45f82f158e04fdf0eeb94ff8" }, "downloads": -1, "filename": "pytest_orchestration-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "9dd1634b249d2563e5f9042f04643042", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9211, "upload_time": "2019-04-09T07:56:57", "url": "https://files.pythonhosted.org/packages/06/34/8c4fc643a232f55906b8ebffe19d772029c780ec15b457f2e19de0c4515e/pytest_orchestration-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c5e22be37906eaddbfa846b674b165c0", "sha256": "9eef78e6fafcd653414496ef388b4e11d1e3b21a40d364cbbef7a54e1d0aef75" }, "downloads": -1, "filename": "pytest-orchestration-0.0.5.tar.gz", "has_sig": false, "md5_digest": "c5e22be37906eaddbfa846b674b165c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7798, "upload_time": "2019-04-09T07:56:59", "url": "https://files.pythonhosted.org/packages/31/73/0f205e8c39620df1d62b8a01835c928000473faa354596577b383fb7ef84/pytest-orchestration-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "2f8dd229ae2be236dbab8736731ce97f", "sha256": "3f2eb269796efa96b03bfd021d25a76db95c3e2503207d5b851410ba11d8f642" }, "downloads": -1, "filename": "pytest_orchestration-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "2f8dd229ae2be236dbab8736731ce97f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9216, "upload_time": "2019-04-09T08:28:42", "url": "https://files.pythonhosted.org/packages/2d/20/4d6c96774aa84fc061746b4d881cc1c8de04ce991944f3e43a463f51a517/pytest_orchestration-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eeeceb313f5a4ab7516bcfb858210275", "sha256": "1aaec21d51b87ff09f1b2f744a0cd72dd0f38efc48e426a7a047307c5b2db950" }, "downloads": -1, "filename": "pytest-orchestration-0.0.6.tar.gz", "has_sig": false, "md5_digest": "eeeceb313f5a4ab7516bcfb858210275", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7809, "upload_time": "2019-04-09T08:28:43", "url": "https://files.pythonhosted.org/packages/21/9f/9088054e428e315dbc96ee977e03dfb9e89682412a758577e81036a9f34d/pytest-orchestration-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "d5ceaf056fb4fa139ad9bbd298508b8a", "sha256": "4025543e2856cb11b2b6579ca6f65374adc715cfe0baa40d5d83d3b671e018ed" }, "downloads": -1, "filename": "pytest_orchestration-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "d5ceaf056fb4fa139ad9bbd298508b8a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9368, "upload_time": "2019-04-17T13:13:29", "url": "https://files.pythonhosted.org/packages/08/74/b5954efbd2c764234972abc75feac524955b7be9d0ea5b2465d610830c5e/pytest_orchestration-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0fe41c4972424e54ff04e0c67524fd07", "sha256": "1f1380abe7584147d94111b1a11e8df31fb88d09ab9e834d900a89904137cb10" }, "downloads": -1, "filename": "pytest-orchestration-0.0.7.tar.gz", "has_sig": false, "md5_digest": "0fe41c4972424e54ff04e0c67524fd07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7942, "upload_time": "2019-04-17T13:13:31", "url": "https://files.pythonhosted.org/packages/01/e4/baa7de3c07ae04749263f3c5f03957b7bb1085bb872d5b4bdc7495aec613/pytest-orchestration-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "3e15be2132eff4398ed552f13e8fa430", "sha256": "67a9fcfd20ea8fee9fff8dbb1b6469575c512f3e5e10f3ec1e58875d9e9e5732" }, "downloads": -1, "filename": "pytest_orchestration-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "3e15be2132eff4398ed552f13e8fa430", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9363, "upload_time": "2019-06-24T12:33:24", "url": "https://files.pythonhosted.org/packages/b4/3f/0fd1b632a22404a5bb6ba29def3f58ec04904d29a4bdce94c217dc51ff24/pytest_orchestration-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c0bc209740161baee95afb2aa1298470", "sha256": "de0a9a7b67b42b268466931ca8b6c1c11ea305561949a2bd4b1db1c51f961d3d" }, "downloads": -1, "filename": "pytest-orchestration-0.0.8.tar.gz", "has_sig": false, "md5_digest": "c0bc209740161baee95afb2aa1298470", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7912, "upload_time": "2019-06-24T12:33:26", "url": "https://files.pythonhosted.org/packages/45/49/5ad880ab510fd38e22be5f80d270c6ce4028424a49e1f4a100edb939342f/pytest-orchestration-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "7fec4cc1196418168f7fcc8ad2f39d59", "sha256": "c0e22a8c62049f5336349bb8ee3bc489e37af198f51d634301577177a1833ddc" }, "downloads": -1, "filename": "pytest_orchestration-0.0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "7fec4cc1196418168f7fcc8ad2f39d59", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9403, "upload_time": "2019-07-17T10:56:15", "url": "https://files.pythonhosted.org/packages/ae/8e/64448ea1e81593750cbfc35eda43325f7ece0017bc3640211dbffa52162d/pytest_orchestration-0.0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cf9feda59612b03f527a36cae569f317", "sha256": "4b0ee5fa6e06f5c75c1b9267051d9f1cff31f38bb4b423cd0771a0fb5e813279" }, "downloads": -1, "filename": "pytest-orchestration-0.0.9.tar.gz", "has_sig": false, "md5_digest": "cf9feda59612b03f527a36cae569f317", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7944, "upload_time": "2019-07-17T10:56:17", "url": "https://files.pythonhosted.org/packages/ed/31/7e480e495c54c62de8babd73bbe4e954bee6effdedbd8123f0795d8806ac/pytest-orchestration-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "914618b09cfb8e612bb65fb4e151873a", "sha256": "5128784e0dbd28017365fac709b1d51601ebe977c04d6e2cae18b7b3a380091e" }, "downloads": -1, "filename": "pytest_orchestration-0.0.10-py3-none-any.whl", "has_sig": false, "md5_digest": "914618b09cfb8e612bb65fb4e151873a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9474, "upload_time": "2019-07-18T07:34:05", "url": "https://files.pythonhosted.org/packages/aa/62/b5b2a4d0f75d4fbb338f63390667637c4eaad6f77167c1dc8c96100af9a0/pytest_orchestration-0.0.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1fddb4e7870349170a421d0a0aad4f48", "sha256": "5abccbfc9ca10f8833b1e4004370eec144ea235242a79d736a065c2b2379a0bc" }, "downloads": -1, "filename": "pytest-orchestration-0.0.10.tar.gz", "has_sig": false, "md5_digest": "1fddb4e7870349170a421d0a0aad4f48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8004, "upload_time": "2019-07-18T07:34:06", "url": "https://files.pythonhosted.org/packages/16/66/3bcbd7f974737dcab12d1425d133186c8dc6333baf58ef6a6314e5c4e5e2/pytest-orchestration-0.0.10.tar.gz" } ] }