{ "info": { "author": "Mykhailo Kolesnyk", "author_email": "mike@openbunker.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Testing" ], "description": "BDD HTTP steps implementation for Behave\n========================================\n\n|Build Status| |Coverage Status|\n\nA Python package for HTTP-service testing. Contains reusable steps for\n`Behave `_ BDD (behaviour-driven\ndevelopment) tool. It\u2019s mostly useful for testing REST APIs and interacting\nwith JSON data over HTTP.\n\nUsage\n-----\n\n*yourapp/features/environment.py*:\n\n::\n\n from behave_http.environment import before_scenario\n\n*yourapp/features/steps/some\\_http\\_stuff.py*:\n\n::\n\n from behave_http.steps import *\n\n(You can mix them with your own steps in the same file.)\n\n*yourapp/features/some\\_api.feature*:\n\n::\n\n Feature: Some API\n As an API client\n I want to be able to manage activities and sessions\n\n Background: Set server name, headers and reset test user's database\n Given I am using server \"$SERVER\"\n And I set base URL to \"$URL\"\n And I set \"Accept\" header to \"application/json\"\n And I set \"Content-Type\" header to \"application/json\"\n And I set BasicAuth username to \"t@example.com\" and password to \"t\"\n\n Scenario: Ensure account exists\n When I make a GET request to \"account\"\n Then the response status should be 200\n\nIf your test target is *http://127.0.0.1:8081/api* you can test it with:\n\n::\n\n SERVER=http://127.0.0.1:8081 URL=api behave\n\nGeneral rules on using quoted ``\"values\"`` in feature files:\n\n- JSONs and numbers (response code, array length) must appear as is.\n- Other substitutes must be quoted (variable names, headers and their\n values).\n\nWhile there is no extensive documentation the *features* (self tests)\ndirectory contains (a hopefully complete) set of usage examples.\n\n*Testing for nested JSON content with non-ASCII characters in paths is\nnot supported by the underlying ``jpath`` library.*\n\nDevelopment\n-----------\n\nTo install essential packages for the test suite:\n\n::\n\n pip install -r requirements_dev.txt\n\nA complete list of development tools used in the ``Makefile`` can be installed\nwith:\n\n::\n\n pip install coveralls docutils flake8 tox wheel\n\nRunning tests\n~~~~~~~~~~~~~\n\nLaunch a special HTTP server responding to test requests:\n\n::\n\n python testserver.py\n\nThen run feature tests in a separate shell:\n\n::\n\n make test-all # runs on every supported python version with tox\n make test # runs in current python environment only\n\nEnvironment variables\n^^^^^^^^^^^^^^^^^^^^^\n\nSet *TEST\\_SERVER* to full URL (including schema) if default port\n(55080) on localhost is already used by another process. For example:\n\n::\n\n export TEST_SERVER=http://127.0.0.1:55081\n python testserver.py >testserver.log 2>&1 &\n make test-coverage\n\nAcknowledgments\n---------------\n\nThe REST steps code is initially derived from *rest api blueprint* [1]_,\nso this project inherits the same BSD 2-Clause License (see LICENSE\nfile).\n\n.. [1] https://bitbucket.org/tcorbettclark/rest-api-blueprint\n\n.. |Build Status| image:: http://img.shields.io/travis/mikek/behave-http/master.svg\n :target: https://travis-ci.org/mikek/behave-http\n.. |Coverage Status| image:: http://img.shields.io/coveralls/mikek/behave-http/master.svg\n :target: https://coveralls.io/r/mikek/behave-http?branch=master\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mikek/behave-http", "keywords": "", "license": "BSD 2-Clause", "maintainer": "", "maintainer_email": "", "name": "behave-http", "package_url": "https://pypi.org/project/behave-http/", "platform": "", "project_url": "https://pypi.org/project/behave-http/", "project_urls": { "Homepage": "https://github.com/mikek/behave-http" }, "release_url": "https://pypi.org/project/behave-http/0.1.1/", "requires_dist": [ "behave (>=1.2.4)", "Jinja2 (>=2.5)", "jpath (>=1.1)", "ensure (>=0.1.6)", "purl (>=0.6)", "requests (>=2.0.0)" ], "requires_python": "", "summary": "Behave HTTP steps", "version": "0.1.1" }, "last_serial": 2451636, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "167a9d5da32083ab559df1b24bf588c5", "sha256": "ae7025b5926e6e129508a9cbb8819d8d3384ea6a6a172386ddb62ca6bc3b3e65" }, "downloads": -1, "filename": "behave_http-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "167a9d5da32083ab559df1b24bf588c5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8681, "upload_time": "2015-11-13T23:48:48", "url": "https://files.pythonhosted.org/packages/d3/dc/6540d34efe15281c227305cd5ffa5e1859c51ee72b77b794ccd3c687179b/behave_http-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "76a8b383f6b398843423be81864f93d3", "sha256": "d3e2cfb8d32275b6c0273651d0825edd6fc5dad11f56fb0a96207376e2899477" }, "downloads": -1, "filename": "behave-http-0.1.0.tar.gz", "has_sig": false, "md5_digest": "76a8b383f6b398843423be81864f93d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6832, "upload_time": "2015-11-13T23:48:53", "url": "https://files.pythonhosted.org/packages/7d/96/ec0401fa10c4d2a7198576a765c3516b6e8d13357c8383c4fd44c57d8835/behave-http-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "21fb4b1d6f32e5ab560e73c6bad0581c", "sha256": "406dae9989d4bee08e01f59366b337a6a479e837bcd40b1ec6553e25b4338fb7" }, "downloads": -1, "filename": "behave_http-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "21fb4b1d6f32e5ab560e73c6bad0581c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8826, "upload_time": "2016-11-09T19:42:25", "url": "https://files.pythonhosted.org/packages/6e/1f/54c10c1c05a3290e7487835f698e2f95466c5c8934490b1bfe7bed09035c/behave_http-0.1.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "21fb4b1d6f32e5ab560e73c6bad0581c", "sha256": "406dae9989d4bee08e01f59366b337a6a479e837bcd40b1ec6553e25b4338fb7" }, "downloads": -1, "filename": "behave_http-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "21fb4b1d6f32e5ab560e73c6bad0581c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8826, "upload_time": "2016-11-09T19:42:25", "url": "https://files.pythonhosted.org/packages/6e/1f/54c10c1c05a3290e7487835f698e2f95466c5c8934490b1bfe7bed09035c/behave_http-0.1.1-py2.py3-none-any.whl" } ] }