{ "info": { "author": "Eduard Kracmar", "author_email": "eduard@adaptiware.com", "bugtrack_url": null, "classifiers": [], "description": "Adaptest - a lightweight YAML wrapper for httest\n================================================\n\n## Overview\n\nThere are many powerful tools for automated HTTP-based tests, and and even in Python:\n\n- [httest](http://htt.sourceforge.net/), HTTP Test tool\n- [pyresttest](https://github.com/svanoort/pyresttest), Python REST Test tool\n- [gabbi](https://github.com/cdent/gabbi), Declarative HTTP Testing tool\n\nBut key features for me were:\n\n- powerful\n- easily maintenable config, ideally using YAML or something similar\n- Cookies support\n- CSRF support\n\nSome of them were HTTP REST and JSON specific. `httest` was best option but not\nvery confortable .htt files especially for Testers with little knowledge of HTTP\nprotocol and programming.\n\nTherefore I wrote `Adaptest` which is basically a `httest` YAML wrapper.\n \n## Features\n \nAs `httest` is really powerful tool, `Adaptest` does not support everything at this stage. But\neven while in alpha stage it supports:\n\n- Sequence HTTP testing\n- Cookies support\n- CSRF support\n- Any request headers\n- Multiple `expect`'s, status, response header tests, body tests\n- Capturing response headers or body using regex to variables and use in later testes\n- POST (application/x-www-form-urlencoded)\n- Auto referer from previous test \n\n## Examples\n\n`Adaptest` turns yaml config of test:\n\n```yml\n---\n\nconfig:\n auto_cookie: on\n\ntests:\n - name: user profile without auth\n url: /en/account/\n method: get\n headers:\n - Connection: keep-alive\n expect:\n - scope: .\n value: \"302 Found\"\n - scope: headers\n value: \"Location: /en/account/log-in/\"\n\n - name: login page to get cookie\n url: /en/account/log-in/\n method: get\n expect:\n - scope: .\n value: 200 OK\n match:\n - scope: headers\n pattern: \"csrftoken=([^;]+)\"\n variable: csrf\n\n - name: login page\n url: /en/account/log-in/\n method: post\n referer: auto\n headers:\n - Content-Type: application/x-www-form-urlencoded\n data:\n - csrfmiddlewaretoken: $csrf\n - username: eduard@adaptiware.com\n - password: Mys3cr3tp455\n expect:\n - scope: .\n value: \"302 Found\"\n\n - name: user profile after auth\n url: /en/account/\n method: get\n headers:\n - Connection: keep-alive\n expect:\n - scope: .\n value: 200 OK\n```\n\ninto this:\n\n```\nCLIENT\n_AUTO_COOKIE on\n\n_REQ example.com SSL:443\n_DEBUG user profile without auth\n__GET /en/account/ HTTP/1.1\n__Host: example.com\n__Cookie: AUTO\n__Connection: keep-alive\n__\n_EXPECT . \"302 Found\"\n_EXPECT headers \"Location: /en/account/log-in/\"\n_WAIT\n_CLOSE\n\n_REQ example.com SSL:443\n_DEBUG login page to get cookie\n__GET /en/account/log-in/ HTTP/1.1\n__Host: example.com\n__Cookie: AUTO\n__\n_EXPECT . \"200 OK\"\n_MATCH headers \"csrftoken=([^;]+)\" csrf\n_WAIT\n_CLOSE\n\n_REQ example.com SSL:443\n_DEBUG login page\n__POST /en/account/log-in/ HTTP/1.1\n__Host: example.com\n__Cookie: AUTO\n__Content-Length: AUTO\n__Content-Type: application/x-www-form-urlencoded\n__Referer: https://example.com/en/account/log-in/\n__\n__csrfmiddlewaretoken=$csrf&username=eduard@adaptiware.com&password=Mys3cr3tp455&\n_EXPECT . \"302 Found\"\n_WAIT\n_CLOSE\n\n_REQ example.com SSL:443\n_DEBUG user profile after auth\n__GET /en/account/ HTTP/1.1\n__Host: example.com\n__Cookie: AUTO\n__Connection: keep-alive\n__\n_EXPECT . \"200 OK\"\n_WAIT\n_CLOSE\n\nEND\n\n```\n\n## Installation\n\n### From source\n\n```bash\ngit clone git@github.com:Edke/adaptest.git\ncd adaptest\nsudo python setup.py install\n```\n\n### From PyPI\n\n```bash\npip install adaptest\n```\n\n## Testing\n\n```bash\ncd tests\npytest\n```\n\n## Status\n\nPlease consider this tool as early alpha, not ready for production. Testing is more than welcome.\n\n## Contributing\n\nFor bugs, feature requests or code contributing please use [Github project page](https://github.com/Edke/adaptest).\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/Edke/adaptest", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "adaptest", "package_url": "https://pypi.org/project/adaptest/", "platform": "", "project_url": "https://pypi.org/project/adaptest/", "project_urls": { "Homepage": "https://github.com/Edke/adaptest" }, "release_url": "https://pypi.org/project/adaptest/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Adaptest - a lightweight YAML wrapper for httest", "version": "0.0.2" }, "last_serial": 2493401, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "2f3c56cace10cc74072b86297786d901", "sha256": "aa839bfa2e37038da578934caa9ed3f13682b7cc1fe9308d16e703555d893789" }, "downloads": -1, "filename": "adaptest-0.0.1.tar.gz", "has_sig": false, "md5_digest": "2f3c56cace10cc74072b86297786d901", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8530, "upload_time": "2016-12-01T09:27:09", "url": "https://files.pythonhosted.org/packages/84/b0/c48bffc3aff3668c34e83efe8c3d396f2a12585b74df351f39d75e25448d/adaptest-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "88a70bc20cdde8e1a9c3f5d0eb46478e", "sha256": "d57224849358139e2bbf244668afb1b6a0a15738348b801f8e9bb1129559a797" }, "downloads": -1, "filename": "adaptest-0.0.2.tar.gz", "has_sig": false, "md5_digest": "88a70bc20cdde8e1a9c3f5d0eb46478e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8587, "upload_time": "2016-12-01T10:23:55", "url": "https://files.pythonhosted.org/packages/3c/66/aeb9d3fef1fb8cdc4bed9d35e9b68e65b814fb05b2af14337580e947f7ea/adaptest-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "88a70bc20cdde8e1a9c3f5d0eb46478e", "sha256": "d57224849358139e2bbf244668afb1b6a0a15738348b801f8e9bb1129559a797" }, "downloads": -1, "filename": "adaptest-0.0.2.tar.gz", "has_sig": false, "md5_digest": "88a70bc20cdde8e1a9c3f5d0eb46478e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8587, "upload_time": "2016-12-01T10:23:55", "url": "https://files.pythonhosted.org/packages/3c/66/aeb9d3fef1fb8cdc4bed9d35e9b68e65b814fb05b2af14337580e947f7ea/adaptest-0.0.2.tar.gz" } ] }