{ "info": { "author": "Faisal Raja", "author_email": "support@altlimit.com", "bugtrack_url": null, "classifiers": [], "description": "# testhttp\n\n\ntesthttp allows you to send HTTP request for testing your endpoints. This is still very incomplete but satisfy my needs at the moment. Feel free to suggest or create changes for updates.\n\n## Features\n* The goal is to be compatible with [vscode-restclient](https://github.com/Huachao/vscode-restclient) but with ability to assert results and automate dependencies.\n* Run named or by index http definition\n* Import other files to re-use http definition\n* Set global variables as a context for the scripts\n\n## Install\n```bash\npip install testhttp\n# -h for help\ntesthttp -h\n\n# Run a file\ntesthttp --file sample.http\n\n# Run all files based on glob pattern\ntesthttp --pattern '/Users/path/to/**/test/*.http'\n# Declaring a global variable that will be available for all scripts\ntesthttp --var host=https://baseurl/\n# Automatically remove steps with the same name\ntesthttp --distinct\n```\n\n## Usage\nIn editor, type an HTTP request as simple as below:\n```http\nhttps://example.com/comments/1\n\n###\n\n# @name postToExample\nPOST https://example.com/comments HTTP/1.1\ncontent-type: application/json\n\n{\n \"name\": \"sample\",\n \"time\": \"Wed, 21 Oct 2015 18:27:50 GMT\"\n}\n\n>>>\n\nassert {{response.status_code}} == 404\n```\nSave it as sample.http then run the command below:\n```bash\n# add --verbose to see request and response information \n# add --debug for debug info\ntesthttp --file.sample.http --name postToExample\n```\n\n## Import\nYou can import other files by:\n```http\n@import other_file.http\n\n###\n\n... rest of your http info\n```\nThis will do a lookup relative to current file. Without specifying --name or --index it will still only run all tests under the current file and will only run things it depends on.\n\n## Variables & Dependencies\nRunning by name will result in execution of it's variable dependencies. This way you can only test specific spec and it will still work with single command.\n```http\n@user = hello\n@password = world\n@baseUrl = https://example.com\n\n# @name login\nPOST {{baseUrl}}/api/login HTTP/1.1\ncontent-type: application/json\n\n{\n \"username\": \"{{user}}\",\n \"password\": \"{{password}}\"\n}\n\n>>>\n\nassert {{response.status_code}} == 200\n\n###\n\n@token = {{login.response.body.token}}\n\n# @name getCurrentUser\nGET {{baseUrl}}/api/me HTTP/1.1\ncontent-type: application/json\nAuthorization: {{token}}\n\n>>>\n\nassert {{response.status_code}} == 200\nassert {{response.body.username}} == {{user}}\n```\nRunning only getCurrentUser will automatically run login since it depends on login in the token variable.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/faisalraja/testhttp", "keywords": "http test api", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "testhttp", "package_url": "https://pypi.org/project/testhttp/", "platform": "", "project_url": "https://pypi.org/project/testhttp/", "project_urls": { "Homepage": "http://github.com/faisalraja/testhttp" }, "release_url": "https://pypi.org/project/testhttp/0.6.3/", "requires_dist": null, "requires_python": "", "summary": "HTTP testing tool", "version": "0.6.3" }, "last_serial": 5463522, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ed302372ca6de837edf9f0fce88f4ba7", "sha256": "98443c7faa8a971ebcaa836c982a47212e4ff1e9cf83fdf3b1abb7f5371bf4ca" }, "downloads": -1, "filename": "testhttp-0.1.tar.gz", "has_sig": false, "md5_digest": "ed302372ca6de837edf9f0fce88f4ba7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5282, "upload_time": "2019-04-18T19:56:28", "url": "https://files.pythonhosted.org/packages/92/18/af2654891a39197a6950bae1187198bcdb7a0b6762b6065b9230299458a4/testhttp-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "60c7a9e984fc46c52acb34f19f320c3e", "sha256": "d8753db85dabde5fd9e0330a1bfe6d26e3bff349f490f91fef68354c55550fac" }, "downloads": -1, "filename": "testhttp-0.2.tar.gz", "has_sig": false, "md5_digest": "60c7a9e984fc46c52acb34f19f320c3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5301, "upload_time": "2019-04-18T20:29:04", "url": "https://files.pythonhosted.org/packages/e0/45/47c6e92f408296d034f61faebe54a867590c8c1393d57d1e19ef05c4ab06/testhttp-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "b4418cdb6526015c499394d1ab7a194f", "sha256": "3271507ac63d57f633b454700c32a261b507fb3a1f2c8bb1df565854294325cf" }, "downloads": -1, "filename": "testhttp-0.3.tar.gz", "has_sig": false, "md5_digest": "b4418cdb6526015c499394d1ab7a194f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5500, "upload_time": "2019-04-18T22:40:26", "url": "https://files.pythonhosted.org/packages/68/02/b70567db7c67a8e393a58e02da216ddd021ca00fdfbbf6e9520c3063395c/testhttp-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "c0e760bec8cfb0bed729cce4d00dc74c", "sha256": "ee685468a06487a6ca312962e72671f3558554af468f1b070f8053b95b760da1" }, "downloads": -1, "filename": "testhttp-0.4.tar.gz", "has_sig": false, "md5_digest": "c0e760bec8cfb0bed729cce4d00dc74c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5588, "upload_time": "2019-04-19T21:11:54", "url": "https://files.pythonhosted.org/packages/f2/0b/f4ba677f48b2c36b59a0ae70333a455eda83bf638b05cd61b7a638dbaf89/testhttp-0.4.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "8c6bff18196285565c44ac25f9115cef", "sha256": "d2263ee3712b1ec32d5e24dc493bcc2722e05a4572c80a5ffa5e53048aa7db85" }, "downloads": -1, "filename": "testhttp-0.5.0.tar.gz", "has_sig": false, "md5_digest": "8c6bff18196285565c44ac25f9115cef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5592, "upload_time": "2019-04-22T21:57:12", "url": "https://files.pythonhosted.org/packages/76/72/ee04ed892ab1e8fd315dbe89f7903e4333bbcd8dfe2b95eb82c5a5000f3c/testhttp-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "58a2e064ea6929d39751b09661de4ce9", "sha256": "d269867f6d8af634c9bbc2e3fbe66706e007f9adddb2e5f50bee553b759db661" }, "downloads": -1, "filename": "testhttp-0.5.1.tar.gz", "has_sig": false, "md5_digest": "58a2e064ea6929d39751b09661de4ce9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5737, "upload_time": "2019-04-24T18:13:27", "url": "https://files.pythonhosted.org/packages/61/27/e41ce48816af797c81695e69381c05679599fde6c14158c32549765bea63/testhttp-0.5.1.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "5e66a0312a202f3b328e73f9b36fc6c8", "sha256": "74e8b55d2e056ade188e5345f82741df20883f92d45a99e33f2395655aafb76a" }, "downloads": -1, "filename": "testhttp-0.6.0.tar.gz", "has_sig": false, "md5_digest": "5e66a0312a202f3b328e73f9b36fc6c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6012, "upload_time": "2019-05-29T18:29:50", "url": "https://files.pythonhosted.org/packages/4e/35/98ad85594360aec4b981910cf38f71386d95ab811d378d6961548c796483/testhttp-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "4f8eee5dc5c8a1e11082f5d8f35c54e7", "sha256": "79f639095c35219ed707fc1b2a0b3eee6f7d207600b1798754bc758509a69ffc" }, "downloads": -1, "filename": "testhttp-0.6.1.tar.gz", "has_sig": false, "md5_digest": "4f8eee5dc5c8a1e11082f5d8f35c54e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6269, "upload_time": "2019-06-03T14:47:28", "url": "https://files.pythonhosted.org/packages/7c/d3/326e7e22bb5ad86ce92f16b056f6dca4912c83b1e96a73343a0502119c64/testhttp-0.6.1.tar.gz" } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "387b5e31cf0298bb5f7cd3c2c3dd98ab", "sha256": "7b179614b8758e706159c3347c4ab9168f2db1f842f415ad62e371af70c36c1a" }, "downloads": -1, "filename": "testhttp-0.6.2.tar.gz", "has_sig": false, "md5_digest": "387b5e31cf0298bb5f7cd3c2c3dd98ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6106, "upload_time": "2019-06-27T22:23:30", "url": "https://files.pythonhosted.org/packages/26/51/024a2d52a09f0264beaa234c6950482c6eccb9a30ea5436bfed215596e71/testhttp-0.6.2.tar.gz" } ], "0.6.3": [ { "comment_text": "", "digests": { "md5": "edb5e072f132008283ef37b8767f2ae9", "sha256": "ef117f67ad0009e2bd9e3507a1e43482811dbf51650f2ea8596f656dc6342caa" }, "downloads": -1, "filename": "testhttp-0.6.3.tar.gz", "has_sig": false, "md5_digest": "edb5e072f132008283ef37b8767f2ae9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6258, "upload_time": "2019-06-28T21:18:55", "url": "https://files.pythonhosted.org/packages/b2/c6/4aa4780e15bfb4222124671a492ec9f8e405b5c6242f08216bac4cdd6845/testhttp-0.6.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "edb5e072f132008283ef37b8767f2ae9", "sha256": "ef117f67ad0009e2bd9e3507a1e43482811dbf51650f2ea8596f656dc6342caa" }, "downloads": -1, "filename": "testhttp-0.6.3.tar.gz", "has_sig": false, "md5_digest": "edb5e072f132008283ef37b8767f2ae9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6258, "upload_time": "2019-06-28T21:18:55", "url": "https://files.pythonhosted.org/packages/b2/c6/4aa4780e15bfb4222124671a492ec9f8e405b5c6242f08216bac4cdd6845/testhttp-0.6.3.tar.gz" } ] }