From 5e76f639cd70543836828326a2c5593e5f186037 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Fri, 12 Jul 2019 23:55:11 +0800 Subject: [PATCH 01/16] feat: replace pipenv & setup.py with poetry --- .travis.yml | 10 +- CHANGELOG.md | 6 + Pipfile | 25 ----- httprunner/__about__.py | 2 +- poetry.lock | 237 ++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 48 ++++++++ setup.py | 114 ------------------- 7 files changed, 297 insertions(+), 145 deletions(-) delete mode 100644 Pipfile create mode 100644 poetry.lock create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.travis.yml b/.travis.yml index d4140c97..55aa8bb8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,10 +11,10 @@ matrix: dist: xenial sudo: true install: - - pip install pipenv --upgrade - - pipenv install --dev --skip-lock + - pip install poetry + - poetry install script: - - pipenv run python setup.py install - - pipenv run coverage run --source=httprunner -m unittest discover + - poetry build + - poetry run coverage run --source=httprunner -m unittest discover after_success: - - pipenv run coveralls \ No newline at end of file + - poetry run coveralls \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 40e9122b..b1ce76f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 2.2.4 + +**Features** + +- replace pipenv & setup.py with poetry + ## 2.2.3 **Bugfixes** diff --git a/Pipfile b/Pipfile deleted file mode 100644 index bee6c544..00000000 --- a/Pipfile +++ /dev/null @@ -1,25 +0,0 @@ -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -requests = "*" -pyyaml = "*" -jinja2 = "*" -har2case = "*" -colorama = "*" -colorlog = "*" -requests-toolbelt = "*" -filetype = "*" - -[dev-packages] -Flask = "<1.0.0" -coverage = "*" -coveralls = "*" -twine = "*" -contextlib2 = "*" -locustio = "*" -wheel = "*" - -[scripts] diff --git a/httprunner/__about__.py b/httprunner/__about__.py index d3f8c825..795de67a 100644 --- a/httprunner/__about__.py +++ b/httprunner/__about__.py @@ -1,7 +1,7 @@ __title__ = 'HttpRunner' __description__ = 'One-stop solution for HTTP(S) testing.' __url__ = 'https://github.com/HttpRunner/HttpRunner' -__version__ = '2.2.3' +__version__ = '2.2.4' __author__ = 'debugtalk' __author_email__ = 'mail@debugtalk.com' __license__ = 'Apache-2.0' diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 00000000..7d7225c3 --- /dev/null +++ b/poetry.lock @@ -0,0 +1,237 @@ +[[package]] +category = "main" +description = "Python package for providing Mozilla's CA Bundle." +name = "certifi" +optional = false +python-versions = "*" +version = "2019.6.16" + +[[package]] +category = "main" +description = "Universal encoding detector for Python 2 and 3" +name = "chardet" +optional = false +python-versions = "*" +version = "3.0.4" + +[[package]] +category = "dev" +description = "Composable command line interface toolkit" +name = "click" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "7.0" + +[[package]] +category = "main" +description = "Cross-platform colored terminal text." +name = "colorama" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "0.4.1" + +[[package]] +category = "main" +description = "Log formatting with colors!" +name = "colorlog" +optional = false +python-versions = "*" +version = "4.0.2" + +[package.dependencies] +colorama = "*" + +[[package]] +category = "dev" +description = "Backports and enhancements for the contextlib module" +name = "contextlib2" +optional = false +python-versions = "*" +version = "0.5.5" + +[[package]] +category = "dev" +description = "Code coverage measurement for Python" +name = "coverage" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4" +version = "4.5.3" + +[[package]] +category = "dev" +description = "Show coverage stats online via coveralls.io" +name = "coveralls" +optional = false +python-versions = "*" +version = "1.8.1" + +[package.dependencies] +coverage = ">=3.6,<5.0" +docopt = ">=0.6.1" +requests = ">=1.0.0" + +[package.dependencies.urllib3] +python = "<3" +version = ">=1.21.1,<1.25" + +[[package]] +category = "dev" +description = "Pythonic argument parser, that will make you smile" +name = "docopt" +optional = false +python-versions = "*" +version = "0.6.2" + +[[package]] +category = "main" +description = "Infer file type and MIME type of any file/buffer. No external dependencies." +name = "filetype" +optional = false +python-versions = "*" +version = "1.0.5" + +[[package]] +category = "dev" +description = "A microframework based on Werkzeug, Jinja2 and good intentions" +name = "flask" +optional = false +python-versions = "*" +version = "0.12.4" + +[package.dependencies] +Jinja2 = ">=2.4" +Werkzeug = ">=0.7" +click = ">=2.0" +itsdangerous = ">=0.21" + +[[package]] +category = "main" +description = "Clean single-source support for Python 3 and 2" +marker = "python_version >= \"2.7\" and python_version < \"2.8\"" +name = "future" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +version = "0.17.1" + +[[package]] +category = "main" +description = "Convert HAR(HTTP Archive) to YAML/JSON testcases for HttpRunner." +name = "har2case" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4" +version = "0.3.1" + +[package.dependencies] +PyYAML = "*" + +[[package]] +category = "main" +description = "Internationalized Domain Names in Applications (IDNA)" +name = "idna" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "2.8" + +[[package]] +category = "dev" +description = "Various helpers to pass data to untrusted environments and back." +name = "itsdangerous" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "1.1.0" + +[[package]] +category = "main" +description = "A small but fast and easy to use stand-alone template engine written in pure python." +name = "jinja2" +optional = false +python-versions = "*" +version = "2.10.1" + +[package.dependencies] +MarkupSafe = ">=0.23" + +[[package]] +category = "main" +description = "Safely add untrusted strings to HTML/XML markup." +name = "markupsafe" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" +version = "1.1.1" + +[[package]] +category = "main" +description = "YAML parser and emitter for Python" +name = "pyyaml" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "5.1.1" + +[[package]] +category = "main" +description = "Python HTTP for Humans." +name = "requests" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "2.21.0" + +[package.dependencies] +certifi = ">=2017.4.17" +chardet = ">=3.0.2,<3.1.0" +idna = ">=2.5,<2.9" +urllib3 = ">=1.21.1,<1.25" + +[[package]] +category = "main" +description = "A utility belt for advanced users of python-requests" +name = "requests-toolbelt" +optional = false +python-versions = "*" +version = "0.9.1" + +[package.dependencies] +requests = ">=2.0.1,<3.0.0" + +[[package]] +category = "main" +description = "HTTP library with thread-safe connection pooling, file post, and more." +name = "urllib3" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4" +version = "1.24.3" + +[[package]] +category = "dev" +description = "The comprehensive WSGI web application library." +name = "werkzeug" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "0.15.4" + +[metadata] +content-hash = "5a7a738fbc922d6440ee4a034c6aa267ce2da069f4370e0d6f1f36e0e11e5488" +python-versions = "~2.7 || ^3.4" + +[metadata.hashes] +certifi = ["046832c04d4e752f37383b628bc601a7ea7211496b4638f6514d0e5b9acc4939", "945e3ba63a0b9f577b1395204e13c3a231f9bc0223888be653286534e5873695"] +chardet = ["84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", "fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"] +click = ["2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13", "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"] +colorama = ["05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d", "f8ac84de7840f5b9c4e3347b3c1eaa50f7e49c2b07596221daec5edaabbd7c48"] +colorlog = ["3cf31b25cbc8f86ec01fef582ef3b840950dea414084ed19ab922c8b493f9b42", "450f52ea2a2b6ebb308f034ea9a9b15cea51e65650593dca1da3eb792e4e4981"] +contextlib2 = ["509f9419ee91cdd00ba34443217d5ca51f5a364a404e1dce9e8979cea969ca48", "f5260a6e679d2ff42ec91ec5252f4eeffdcf21053db9113bd0a8e4d953769c00"] +coverage = ["0c5fe441b9cfdab64719f24e9684502a59432df7570521563d7b1aff27ac755f", "2b412abc4c7d6e019ce7c27cbc229783035eef6d5401695dccba80f481be4eb3", "3684fabf6b87a369017756b551cef29e505cb155ddb892a7a29277b978da88b9", "39e088da9b284f1bd17c750ac672103779f7954ce6125fd4382134ac8d152d74", "3c205bc11cc4fcc57b761c2da73b9b72a59f8d5ca89979afb0c1c6f9e53c7390", "42692db854d13c6c5e9541b6ffe0fe921fe16c9c446358d642ccae1462582d3b", "465ce53a8c0f3a7950dfb836438442f833cf6663d407f37d8c52fe7b6e56d7e8", "48020e343fc40f72a442c8a1334284620f81295256a6b6ca6d8aa1350c763bbe", "4ec30ade438d1711562f3786bea33a9da6107414aed60a5daa974d50a8c2c351", "5296fc86ab612ec12394565c500b412a43b328b3907c0d14358950d06fd83baf", "5f61bed2f7d9b6a9ab935150a6b23d7f84b8055524e7be7715b6513f3328138e", "6899797ac384b239ce1926f3cb86ffc19996f6fa3a1efbb23cb49e0c12d8c18c", "68a43a9f9f83693ce0414d17e019daee7ab3f7113a70c79a3dd4c2f704e4d741", "6b8033d47fe22506856fe450470ccb1d8ba1ffb8463494a15cfc96392a288c09", "7ad7536066b28863e5835e8cfeaa794b7fe352d99a8cded9f43d1161be8e9fbd", "7bacb89ccf4bedb30b277e96e4cc68cd1369ca6841bde7b005191b54d3dd1034", "839dc7c36501254e14331bcb98b27002aa415e4af7ea039d9009409b9d2d5420", "8e679d1bde5e2de4a909efb071f14b472a678b788904440779d2c449c0355b27", "8f9a95b66969cdea53ec992ecea5406c5bd99c9221f539bca1e8406b200ae98c", "932c03d2d565f75961ba1d3cec41ddde00e162c5b46d03f7423edcb807734eab", "93f965415cc51604f571e491f280cff0f5be35895b4eb5e55b47ae90c02a497b", "988529edadc49039d205e0aa6ce049c5ccda4acb2d6c3c5c550c17e8c02c05ba", "998d7e73548fe395eeb294495a04d38942edb66d1fa61eb70418871bc621227e", "9de60893fb447d1e797f6bf08fdf0dbcda0c1e34c1b06c92bd3a363c0ea8c609", "9e80d45d0c7fcee54e22771db7f1b0b126fb4a6c0a2e5afa72f66827207ff2f2", "a545a3dfe5082dc8e8c3eb7f8a2cf4f2870902ff1860bd99b6198cfd1f9d1f49", "a5d8f29e5ec661143621a8f4de51adfb300d7a476224156a39a392254f70687b", "a9abc8c480e103dc05d9b332c6cc9fb1586330356fc14f1aa9c0ca5745097d19", "aca06bfba4759bbdb09bf52ebb15ae20268ee1f6747417837926fae990ebc41d", "bb23b7a6fd666e551a3094ab896a57809e010059540ad20acbeec03a154224ce", "bfd1d0ae7e292105f29d7deaa9d8f2916ed8553ab9d5f39ec65bcf5deadff3f9", "c22ab9f96cbaff05c6a84e20ec856383d27eae09e511d3e6ac4479489195861d", "c62ca0a38958f541a73cf86acdab020c2091631c137bd359c4f5bddde7b75fd4", "c709d8bda72cf4cd348ccec2a4881f2c5848fd72903c185f363d361b2737f773", "c968a6aa7e0b56ecbd28531ddf439c2ec103610d3e2bf3b75b813304f8cb7723", "ca58eba39c68010d7e87a823f22a081b5290e3e3c64714aac3c91481d8b34d22", "df785d8cb80539d0b55fd47183264b7002077859028dfe3070cf6359bf8b2d9c", "f406628ca51e0ae90ae76ea8398677a921b36f0bd71aab2099dfed08abd0322f", "f46087bbd95ebae244a0eda01a618aff11ec7a069b15a3ef8f6b520db523dcf1", "f8019c5279eb32360ca03e9fac40a12667715546eed5c5eb59eb381f2f501260", "fc5f4d209733750afd2714e9109816a29500718b32dd9a5db01c0cb3a019b96a"] +coveralls = ["d3d49234bffd41e91b241a69f0ebb9f64d7f0515711a76134d53d4647e7eb509", "dafabcff87425fa2ab3122dee21229afbb4d6692cfdacc6bb895f7dfa8b2c849"] +docopt = ["49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"] +filetype = ["17a3b885f19034da29640b083d767e0f13c2dcb5dcc267945c8b6e5a5a9013c7", "4967124d982a71700d94a08c49c4926423500e79382a92070f5ab248d44fe461"] +flask = ["2ea22336f6d388b4b242bc3abf8a01244a8aa3e236e7407469ef78c16ba355dd", "6c02dbaa5a9ef790d8219bdced392e2d549c10cd5a5ba4b6aa65126b2271af29"] +future = ["67045236dcfd6816dc439556d009594abf643e5eb48992e36beac09c2ca659b8"] +har2case = ["84d3a5cc9fbb16e45372e7e880a936c59bbe8e9b66bad81927769e64f608e2af", "8f159ec7cba82ec4282f46af4a9dac89f65e62796521b2426d3c89c3c9fd8579"] +idna = ["c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407", "ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"] +itsdangerous = ["321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19", "b12271b2047cb23eeb98c8b5622e2e5c5e9abd9784a153e9d8ef9cb4dd09d749"] +jinja2 = ["065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013", "14dd6caf1527abb21f08f86c784eac40853ba93edb79552aa1e4b8aef1b61c7b"] +markupsafe = ["00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", "09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161", "09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235", "1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5", "24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff", "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", "43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1", "46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e", "500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", "535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66", "62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1", "6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1", "717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e", "79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b", "7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905", "88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735", "8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d", "98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e", "9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d", "9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c", "ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21", "b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2", "b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5", "b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b", "ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6", "c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f", "cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f", "e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"] +pyyaml = ["57acc1d8533cbe51f6662a55434f0dbecfa2b9eaf115bede8f6fd00115a0c0d3", "588c94b3d16b76cfed8e0be54932e5729cc185caffaa5a451e7ad2f7ed8b4043", "68c8dd247f29f9a0d09375c9c6b8fdc64b60810ebf07ba4cdd64ceee3a58c7b7", "70d9818f1c9cd5c48bb87804f2efc8692f1023dac7f1a1a5c61d454043c1d265", "86a93cccd50f8c125286e637328ff4eef108400dd7089b46a7be3445eecfa391", "a0f329125a926876f647c9fa0ef32801587a12328b4a3c741270464e3e4fa778", "a3c252ab0fa1bb0d5a3f6449a4826732f3eb6c0270925548cac342bc9b22c225", "b4bb4d3f5e232425e25dda21c070ce05168a786ac9eda43768ab7f3ac2770955", "cd0618c5ba5bda5f4039b9398bb7fb6a317bb8298218c3de25c47c4740e4b95e", "ceacb9e5f8474dcf45b940578591c7f3d960e82f926c707788a570b51ba59190", "fe6a88094b64132c4bb3b631412e90032e8cfe9745a58370462240b8cb7553cd"] +requests = ["502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e", "7bf2a778576d825600030a110f3c0e3e8edc51dfaafe1c146e39a2027784957b"] +requests-toolbelt = ["380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f", "968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"] +urllib3 = ["2393a695cd12afedd0dcb26fe5d50d0cf248e5a66f75dbd89a3d4eb333a61af4", "a637e5fae88995b256e3409dc4d52c2e2e0ba32c42a6365fee8bbd2238de3cfb"] +werkzeug = ["865856ebb55c4dcd0630cdd8f3331a1847a819dda7e8c750d3db6f2aa6c0209c", "a0b915f0815982fb2a09161cb8f31708052d0951c3ba433ccc5e1aa276507ca6"] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..9976e4d6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,48 @@ +[tool.poetry] +name = "httprunner" +version = "2.2.4" +description = "One-stop solution for HTTP(S) testing." +license = "Apache-2.0" +readme = "README.md" +authors = ["debugtalk "] + +homepage = "https://github.com/HttpRunner/HttpRunner" +repository = "https://github.com/HttpRunner/HttpRunner" +documentation = "https://cn.httprunner.org" + +keywords = ["HTTP", "api", "test", "requests", "locustio"] + +classifiers = [ + "Topic :: Software Development :: Build Tools", + "Topic :: Software Development :: Libraries :: Python Modules" +] + +include = ["CHANGELOG.md", "httprunner/templates/*"] + +[tool.poetry.dependencies] +python = "~2.7 || ^3.4" +requests = "^2.14" +requests-toolbelt = "^0.9.1" +pyyaml = "^5.1" +jinja2 = "^2.10" +har2case = "^0.3.1" +colorama = "^0.4.1" +colorlog = "^4.0" +filetype = "^1.0" +future = { version = "^0.17.1", python = "~2.7" } + +[tool.poetry.dev-dependencies] +flask = "<1.0.0" +coverage = "^4.5" +coveralls = "^1.8" +contextlib2 = "^0.5.5" + +[tool.poetry.scripts] +hrun = "httprunner.cli:main_hrun" +ate = "httprunner.cli:main_hrun" +httprunner = "httprunner.cli:main_hrun" +locusts = "httprunner.cli:main_locust" + +[build-system] +requires = ["poetry>=0.12"] +build-backend = "poetry.masonry.api" diff --git a/setup.py b/setup.py deleted file mode 100644 index b0c5dfa0..00000000 --- a/setup.py +++ /dev/null @@ -1,114 +0,0 @@ -#encoding: utf-8 -import io -import os -import sys -from shutil import rmtree - -from setuptools import Command, find_packages, setup - -about = {} -here = os.path.abspath(os.path.dirname(__file__)) -with io.open(os.path.join(here, 'httprunner', '__about__.py'), encoding='utf-8') as f: - exec(f.read(), about) - -with io.open("README.md", encoding='utf-8') as f: - long_description = f.read() - -install_requires = [ - "requests", - "PyYAML", - "Jinja2", - "har2case", - "colorama", - "colorlog", - "requests_toolbelt", - "filetype" -] - -# Python 2.x? -is_py2 = (sys.version_info[0] == 2) -if is_py2: - install_requires.append("future") - -class UploadCommand(Command): - """ Build and publish this package. - Support setup.py upload. Copied from requests_html. - """ - - user_options = [] - - @staticmethod - def status(s): - """Prints things in green color.""" - print("\033[0;32m{0}\033[0m".format(s)) - - def initialize_options(self): - """ override - """ - pass - - def finalize_options(self): - """ override - """ - pass - - def run(self): - try: - self.status('Removing previous builds…') - rmtree(os.path.join(here, 'dist')) - except OSError: - pass - - self.status('Building Source and Wheel (universal) distribution…') - os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable)) - - self.status('Uploading the package to PyPi via Twine…') - os.system('twine upload dist/*') - - self.status('Publishing git tags…') - os.system('git tag v{0}'.format(about['__version__'])) - os.system('git push --tags') - - sys.exit() - - -setup( - name=about['__title__'], - version=about['__version__'], - description=about['__description__'], - long_description=long_description, - long_description_content_type='text/markdown', - author=about['__author__'], - author_email=about['__author_email__'], - url=about['__url__'], - license=about['__license__'], - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4', - packages=find_packages(exclude=["examples", "tests", "tests.*"]), - package_data={ - '': ["README.md"], - 'httprunner': ["templates/*"], - }, - keywords='HTTP api test requests locust', - install_requires=install_requires, - extras_require={}, - classifiers=[ - "Development Status :: 3 - Alpha", - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7' - ], - entry_points={ - 'console_scripts': [ - 'ate=httprunner.cli:main_hrun', - 'httprunner=httprunner.cli:main_hrun', - 'hrun=httprunner.cli:main_hrun', - 'locusts=httprunner.cli:main_locust' - ] - }, - # $ setup.py upload support. - cmdclass={ - 'upload': UploadCommand - } -) From 4def62846380b4346cd203f2fadf3c3fd72a824f Mon Sep 17 00:00:00 2001 From: debugtalk Date: Sat, 13 Jul 2019 00:55:37 +0800 Subject: [PATCH 02/16] print verbose logs when installing --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 55aa8bb8..8bf810cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ matrix: sudo: true install: - pip install poetry - - poetry install + - poetry install -v script: - poetry build - poetry run coverage run --source=httprunner -m unittest discover From b43f9543a19a4e05d1bc930d9dc1f0a2b7d93b8c Mon Sep 17 00:00:00 2001 From: debugtalk Date: Sat, 13 Jul 2019 01:25:43 +0800 Subject: [PATCH 03/16] drop support for Python 3.4 as it was EOL on 2019-03-16 --- .travis.yml | 3 +-- CHANGELOG.md | 1 + pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8bf810cc..b0f4f2b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ sudo: false language: python python: - 2.7 - - 3.4 - 3.5 - 3.6 matrix: @@ -12,7 +11,7 @@ matrix: sudo: true install: - pip install poetry - - poetry install -v + - poetry install -vvv script: - poetry build - poetry run coverage run --source=httprunner -m unittest discover diff --git a/CHANGELOG.md b/CHANGELOG.md index b1ce76f7..ec242196 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Features** - replace pipenv & setup.py with poetry +- drop support for Python 3.4 as it was EOL on 2019-03-16 ## 2.2.3 diff --git a/pyproject.toml b/pyproject.toml index 9976e4d6..450f7eed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ classifiers = [ include = ["CHANGELOG.md", "httprunner/templates/*"] [tool.poetry.dependencies] -python = "~2.7 || ^3.4" +python = "~2.7 || ^3.5" requests = "^2.14" requests-toolbelt = "^0.9.1" pyyaml = "^5.1" From fe20ccebda2cdd0145abdad0bf9a79abe65fe864 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Sat, 13 Jul 2019 15:17:36 +0800 Subject: [PATCH 04/16] update history categories with Added/Fixed/Changed --- CHANGELOG.md | 55 ++++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec242196..ec5f92e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,34 +1,34 @@ # Release History -## 2.2.4 +## 2.2.4 (2019-07-13) -**Features** +**Changed** - replace pipenv & setup.py with poetry - drop support for Python 3.4 as it was EOL on 2019-03-16 -## 2.2.3 +## 2.2.3 (2019-06-30) -**Bugfixes** +**Fixed** - fix yaml FullLoader AttributeError when PyYAML version < 5.1 ## 2.2.2 (2019-06-26) -**Features** +**Changed** - `extract` is used to replace `output` when passing former teststep's (as a testcase) export value to next teststep - `export` is used to replace `output` in testcase config ## 2.2.1 (2019-06-25) -**Features** +**Added** - add demo api/testcase/testsuite to new created scaffold project - update default `.gitignore` of new created scaffold project - add demo content to `debugtalk.py`/`.env` of new created scaffold project -**Bugfixes** +**Fixed** - fix extend with testcase reference in format version 2 - fix ImportError when locustio is not installed @@ -36,31 +36,31 @@ ## 2.2.0 (2019-06-24) -**Features** +**Added** - support testcase/testsuite in format version 2 -**Bugfixes** +**Fixed** - add wheel in dev packages - fix exception when teststep name reference former extracted variable ## 2.1.3 (2019-04-24) -**Bugfixes** +**Fixed** - replace eval mechanism with builtins to prevent security vulnerabilities - ImportError for builtins in Python2.7 ## 2.1.2 (2019-04-17) -**Features** +**Added** - support new variable notation ${var} - use \$\$ to escape \$ notation - add Python 3.7 for travis CI -**Bugfixes** +**Fixed** - match duplicate variable/function in single raw string - escape '{' and '}' notation in raw string @@ -69,7 +69,7 @@ ## 2.1.1 (2019-04-11) -**Features** +**Changed** refactor upload files mechanism with [requests-toolbelt](https://toolbelt.readthedocs.io/en/latest/user.html#multipart-form-data-encoder): @@ -78,41 +78,41 @@ refactor upload files mechanism with [requests-toolbelt](https://toolbelt.readth ## 2.1.0 (2019-04-10) -**Features** +**Added** - implement json dump Python objects when save tests - implement lazy parser - remove project_mapping from parse_tests result -**Bugfixes** +**Fixed** - reference output variables - pass output variables between testcases ## 2.0.6 (2019-03-18) -**Features** +**Added** - create .gitignore file when initializing new project -**Bugfixes** +**Fixed** - fix CSV relative path detection - fix current validators displaying the former one when they are empty ## 2.0.5 (2019-03-04) -**Features** +**Added** - implement method to get variables and output -**Bugfixes** +**Fixed** - fix xss in response json ## 2.0.4 (2019-02-28) -**Bugfixes** +**Fixed** - fix verify priority with nested testcase - fix function in config variables called multiple times @@ -120,7 +120,7 @@ refactor upload files mechanism with [requests-toolbelt](https://toolbelt.readth ## 2.0.3 (2019-02-24) -**Bugfixes** +**Fixed** - fix verify priority: teststep > config - fix Chinese charactor in log_file encoding error in Windows @@ -128,12 +128,12 @@ refactor upload files mechanism with [requests-toolbelt](https://toolbelt.readth ## 2.0.2 (2019-01-21) -**Bugfixes** +**Fixed** - each teststeps in one testcase share the same session - fix duplicate API definition output -**Improvements** +**Changed** - display result from hook functions in DEBUG level log - change log level of "Variables & Output" to INFO @@ -142,15 +142,20 @@ refactor upload files mechanism with [requests-toolbelt](https://toolbelt.readth ## 2.0.1 (2019-01-18) -**Bugfixes** +**Fixed** - override current teststep variables with former testcase output variables -- make compatible with testcase name is empty +- Fixed compatibility when testcase name is empty - skip undefined variable when parsing string content + +**Changed** + - add back request method in report ## 2.0.0 (2019-01-01) +**Changed** + - Massive Refactor and Simplification - Redesign testcase structure - Module pipline From db45480d0f2ee453c861983ca2767d2c47f0c16e Mon Sep 17 00:00:00 2001 From: debugtalk Date: Sun, 14 Jul 2019 22:25:13 +0800 Subject: [PATCH 05/16] fix #574: delete unnecessary code --- CHANGELOG.md | 4 ++++ httprunner/parser.py | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec5f92e1..8a99c16a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ - replace pipenv & setup.py with poetry - drop support for Python 3.4 as it was EOL on 2019-03-16 +**Fixed** + +- fix #574: delete unnecessary code + ## 2.2.3 (2019-06-30) **Fixed** diff --git a/httprunner/parser.py b/httprunner/parser.py index c0cce828..4a85ac65 100644 --- a/httprunner/parser.py +++ b/httprunner/parser.py @@ -482,7 +482,6 @@ class LazyString(object): # search function like ${func($a, $b)} func_match = function_regex_compile.match(raw_string, match_start_position) if func_match: - function_meta = parse_function_params(func_match.group(1)) function_meta = { "func_name": func_match.group(1) } From 848991c68e932136ffed0c110dc82949f6bbc879 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Sun, 14 Jul 2019 23:22:17 +0800 Subject: [PATCH 06/16] fix #551: raise if times is not digit --- CHANGELOG.md | 1 + httprunner/api.py | 9 ++++++++- tests/test_api.py | 35 ++++++++++++++++++++++++++++++++++- 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a99c16a..c9b6c6e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ **Fixed** - fix #574: delete unnecessary code +- fix #551: raise if times is not digit ## 2.2.3 (2019-06-30) diff --git a/httprunner/api.py b/httprunner/api.py index a2eca860..0a70277e 100644 --- a/httprunner/api.py +++ b/httprunner/api.py @@ -85,7 +85,14 @@ class HttpRunner(object): tests = testcase.get("teststeps", []) for index, test_dict in enumerate(tests): - for times_index in range(int(test_dict.get("times", 1))): + times = test_dict.get("times", 1) + try: + times = int(times) + except ValueError: + raise exceptions.ParamsError( + "times should be digit, given: {}".format(times)) + + for times_index in range(times): # suppose one testcase should not have more than 9999 steps, # and one step should not run more than 999 times. test_method_name = 'test_{:04}_{:03}'.format(index, times_index) diff --git a/tests/test_api.py b/tests/test_api.py index c55feb5c..2f0fa5ce 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -4,7 +4,7 @@ import shutil import time import unittest -from httprunner import loader, parser +from httprunner import exceptions, loader, parser from httprunner.api import HttpRunner, prepare_locust_tests from tests.api_server import HTTPBIN_SERVER from tests.base import ApiServerUnittest @@ -80,6 +80,39 @@ class TestHttpRunner(ApiServerUnittest): self.assertEqual(self.runner.summary["stat"]["testcases"]["total"], 1) self.assertEqual(self.runner.summary["stat"]["teststeps"]["total"], 10) + def test_text_run_times_invalid(self): + testcases = [ + { + "config": { + 'name': "post data", + 'variables': [] + }, + "teststeps": [ + { + "name": "post data", + "times": "1.5", + "request": { + "url": "{}/post".format(HTTPBIN_SERVER), + "method": "POST", + "headers": { + "User-Agent": "python-requests/2.18.4", + "Content-Type": "application/json" + }, + "data": "abc" + }, + "validate": [ + {"eq": ["status_code", 200]} + ] + } + ] + } + ] + tests_mapping = { + "testcases": testcases + } + with self.assertRaises(exceptions.ParamsError): + self.runner.run_tests(tests_mapping) + def test_text_skip(self): self.runner.run(self.testcase_cli_path) self.assertEqual(self.runner.summary["stat"]["teststeps"]["skipped"], 4) From b60abd4321d2ce60701e732e0ef3503c39335977 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Mon, 15 Jul 2019 00:18:46 +0800 Subject: [PATCH 07/16] fix #572: tests_def_mapping["testcases"] typo error --- CHANGELOG.md | 1 + httprunner/loader.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9b6c6e9..81553ab0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - fix #574: delete unnecessary code - fix #551: raise if times is not digit +- fix #572: tests_def_mapping["testcases"] typo error ## 2.2.3 (2019-06-30) diff --git a/httprunner/loader.py b/httprunner/loader.py index 0bf93417..1df7a8a3 100644 --- a/httprunner/loader.py +++ b/httprunner/loader.py @@ -351,9 +351,9 @@ def __extend_with_testcase_ref(raw_testinfo): raise exceptions.FileFormatError( "Invalid format testcase: {}".format(testcase_path)) - tests_def_mapping[testcase_path] = testcase_dict + tests_def_mapping["testcases"][testcase_path] = testcase_dict else: - testcase_dict = tests_def_mapping[testcase_path] + testcase_dict = tests_def_mapping["testcases"][testcase_path] raw_testinfo["testcase_def"] = testcase_dict From a039b80fa76decf70e72c5152f4a53c8321e7ac5 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Tue, 16 Jul 2019 18:56:52 +0800 Subject: [PATCH 08/16] improvement: maintain project meta data all in pyproject.toml 1, remove __about__.py 2, project version and description are all configured in pyproject.toml --- httprunner/__about__.py | 9 --------- httprunner/__init__.py | 9 +++++++++ httprunner/cli.py | 2 +- httprunner/report.py | 3 +-- pyproject.toml | 2 +- 5 files changed, 12 insertions(+), 13 deletions(-) delete mode 100644 httprunner/__about__.py diff --git a/httprunner/__about__.py b/httprunner/__about__.py deleted file mode 100644 index 795de67a..00000000 --- a/httprunner/__about__.py +++ /dev/null @@ -1,9 +0,0 @@ -__title__ = 'HttpRunner' -__description__ = 'One-stop solution for HTTP(S) testing.' -__url__ = 'https://github.com/HttpRunner/HttpRunner' -__version__ = '2.2.4' -__author__ = 'debugtalk' -__author_email__ = 'mail@debugtalk.com' -__license__ = 'Apache-2.0' -__copyright__ = 'Copyright 2017 debugtalk' -__cake__ = u'\u2728 \U0001f370 \u2728' \ No newline at end of file diff --git a/httprunner/__init__.py b/httprunner/__init__.py index e69de29b..1516a0e9 100644 --- a/httprunner/__init__.py +++ b/httprunner/__init__.py @@ -0,0 +1,9 @@ +import configparser +import json + +cf_parser = configparser.ConfigParser(allow_no_value=True) +cf_parser.read("pyproject.toml") +__version__ = json.loads(cf_parser["tool.poetry"]["version"]) +__description__ = json.loads(cf_parser["tool.poetry"]["description"]) + +__all__ = ["__version__", "__description__"] diff --git a/httprunner/cli.py b/httprunner/cli.py index 2bafe0c8..677f7be8 100644 --- a/httprunner/cli.py +++ b/httprunner/cli.py @@ -5,7 +5,7 @@ def main_hrun(): """ import argparse from httprunner import logger - from httprunner.__about__ import __description__, __version__ + from httprunner import __description__, __version__ from httprunner.api import HttpRunner from httprunner.compat import is_py2 from httprunner.validator import validate_json_file diff --git a/httprunner/report.py b/httprunner/report.py index 19d1581a..989e2b3b 100644 --- a/httprunner/report.py +++ b/httprunner/report.py @@ -10,8 +10,7 @@ from collections import Iterable from datetime import datetime import requests -from httprunner import loader, logger -from httprunner.__about__ import __version__ +from httprunner import __version__, loader, logger from httprunner.compat import basestring, bytes, json, numeric_types from jinja2 import Template, escape diff --git a/pyproject.toml b/pyproject.toml index 450f7eed..f5178551 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ version = "2.2.4" description = "One-stop solution for HTTP(S) testing." license = "Apache-2.0" readme = "README.md" -authors = ["debugtalk "] +authors = ["debugtalk "] homepage = "https://github.com/HttpRunner/HttpRunner" repository = "https://github.com/HttpRunner/HttpRunner" From dc3b437b1966434943485c173a0840076068c1a1 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Tue, 16 Jul 2019 22:28:18 +0800 Subject: [PATCH 09/16] fix: 'conflict with the backend dependencies' error --- pyproject.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f5178551..767822f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,7 @@ ate = "httprunner.cli:main_hrun" httprunner = "httprunner.cli:main_hrun" locusts = "httprunner.cli:main_locust" -[build-system] -requires = ["poetry>=0.12"] -build-backend = "poetry.masonry.api" +# commenting for https://github.com/sdispater/poetry/issues/1049 +# [build-system] +# requires = ["poetry>=0.12"] +# build-backend = "poetry.masonry.api" From 4946e70f30952c96c6887a3af5427a8f3569acf1 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Tue, 16 Jul 2019 22:31:20 +0800 Subject: [PATCH 10/16] fix: 'conflict with the backend dependencies' for requests-belt --- pyproject.toml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 767822f7..12271961 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ include = ["CHANGELOG.md", "httprunner/templates/*"] [tool.poetry.dependencies] python = "~2.7 || ^3.5" requests = "^2.14" -requests-toolbelt = "^0.9.1" +requests-toolbelt = "^0.8.0" pyyaml = "^5.1" jinja2 = "^2.10" har2case = "^0.3.1" @@ -43,7 +43,6 @@ ate = "httprunner.cli:main_hrun" httprunner = "httprunner.cli:main_hrun" locusts = "httprunner.cli:main_locust" -# commenting for https://github.com/sdispater/poetry/issues/1049 -# [build-system] -# requires = ["poetry>=0.12"] -# build-backend = "poetry.masonry.api" +[build-system] +requires = ["poetry>=0.12"] +build-backend = "poetry.masonry.api" From 70b1c51fe8d7cd93208df93935031063d2a6a114 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Thu, 18 Jul 2019 16:01:28 +0800 Subject: [PATCH 11/16] fix: get project version and description. this will be improved after poetry fixed issue https://github.com/sdispater/poetry/issues/144 --- httprunner/__init__.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/httprunner/__init__.py b/httprunner/__init__.py index 1516a0e9..8bf642e8 100644 --- a/httprunner/__init__.py +++ b/httprunner/__init__.py @@ -1,9 +1,4 @@ -import configparser -import json - -cf_parser = configparser.ConfigParser(allow_no_value=True) -cf_parser.read("pyproject.toml") -__version__ = json.loads(cf_parser["tool.poetry"]["version"]) -__description__ = json.loads(cf_parser["tool.poetry"]["description"]) +__version__ = "2.2.4" +__description__ = "One-stop solution for HTTP(S) testing." __all__ = ["__version__", "__description__"] From eb1ff83f703db96ac3d074fe836eca44a3a26536 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Thu, 18 Jul 2019 17:27:54 +0800 Subject: [PATCH 12/16] update locked dependencies --- poetry.lock | 127 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 117 insertions(+), 10 deletions(-) diff --git a/poetry.lock b/poetry.lock index 7d7225c3..caed3e92 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,3 +1,12 @@ +[[package]] +category = "dev" +description = "Fast ASN.1 parser and serializer with definitions for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8, PKCS#12, PKCS#5, X.509 and TSP" +marker = "python_version < \"3\" and extra == \"secure\"" +name = "asn1crypto" +optional = false +python-versions = "*" +version = "0.24.0" + [[package]] category = "main" description = "Python package for providing Mozilla's CA Bundle." @@ -6,6 +15,18 @@ optional = false python-versions = "*" version = "2019.6.16" +[[package]] +category = "dev" +description = "Foreign Function Interface for Python calling C code." +marker = "python_version < \"3\" and extra == \"secure\"" +name = "cffi" +optional = false +python-versions = "*" +version = "1.12.3" + +[package.dependencies] +pycparser = "*" + [[package]] category = "main" description = "Universal encoding detector for Python 2 and 3" @@ -74,6 +95,28 @@ requests = ">=1.0.0" python = "<3" version = ">=1.21.1,<1.25" +[[package]] +category = "dev" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +marker = "python_version < \"3\" and extra == \"secure\"" +name = "cryptography" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" +version = "2.7" + +[package.dependencies] +asn1crypto = ">=0.21.0" +cffi = ">=1.8,<1.11.3 || >1.11.3" +six = ">=1.4.1" + +[package.dependencies.enum34] +python = "<3" +version = "*" + +[package.dependencies.ipaddress] +python = "<3" +version = "*" + [[package]] category = "dev" description = "Pythonic argument parser, that will make you smile" @@ -82,6 +125,15 @@ optional = false python-versions = "*" version = "0.6.2" +[[package]] +category = "dev" +description = "Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4" +marker = "python_version < \"3\" and extra == \"secure\"" +name = "enum34" +optional = false +python-versions = "*" +version = "1.1.6" + [[package]] category = "main" description = "Infer file type and MIME type of any file/buffer. No external dependencies." @@ -132,6 +184,15 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "2.8" +[[package]] +category = "dev" +description = "IPv4/IPv6 manipulation library" +marker = "python_version < \"3\" and extra == \"secure\"" +name = "ipaddress" +optional = false +python-versions = "*" +version = "1.0.22" + [[package]] category = "dev" description = "Various helpers to pass data to untrusted environments and back." @@ -159,6 +220,28 @@ optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" version = "1.1.1" +[[package]] +category = "dev" +description = "C parser in Python" +marker = "python_version < \"3\" and extra == \"secure\"" +name = "pycparser" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "2.19" + +[[package]] +category = "dev" +description = "Python wrapper module around the OpenSSL library" +marker = "python_version < \"3\" and extra == \"secure\"" +name = "pyopenssl" +optional = false +python-versions = "*" +version = "19.0.0" + +[package.dependencies] +cryptography = ">=2.3" +six = ">=1.5.2" + [[package]] category = "main" description = "YAML parser and emitter for Python" @@ -172,14 +255,14 @@ category = "main" description = "Python HTTP for Humans." name = "requests" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.21.0" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "2.22.0" [package.dependencies] certifi = ">=2017.4.17" chardet = ">=3.0.2,<3.1.0" idna = ">=2.5,<2.9" -urllib3 = ">=1.21.1,<1.25" +urllib3 = ">=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26" [[package]] category = "main" @@ -187,11 +270,20 @@ description = "A utility belt for advanced users of python-requests" name = "requests-toolbelt" optional = false python-versions = "*" -version = "0.9.1" +version = "0.8.0" [package.dependencies] requests = ">=2.0.1,<3.0.0" +[[package]] +category = "dev" +description = "Python 2 and 3 compatibility utilities" +marker = "python_version < \"3\" and extra == \"secure\"" +name = "six" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*" +version = "1.12.0" + [[package]] category = "main" description = "HTTP library with thread-safe connection pooling, file post, and more." @@ -200,20 +292,29 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4" version = "1.24.3" +[package.dependencies] +certifi = "*" +cryptography = ">=1.3.4" +idna = ">=2.0.0" +ipaddress = "*" +pyOpenSSL = ">=0.14" + [[package]] category = "dev" description = "The comprehensive WSGI web application library." name = "werkzeug" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.15.4" +version = "0.15.5" [metadata] -content-hash = "5a7a738fbc922d6440ee4a034c6aa267ce2da069f4370e0d6f1f36e0e11e5488" -python-versions = "~2.7 || ^3.4" +content-hash = "f65a674bd12f46ac9b4a8375fb8ee051bcaaf88dd6b8d793d7cd6aae54e81186" +python-versions = "~2.7 || ^3.5" [metadata.hashes] +asn1crypto = ["2f1adbb7546ed199e3c90ef23ec95c5cf3585bac7d11fb7eb562a3fe89c64e87", "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49"] certifi = ["046832c04d4e752f37383b628bc601a7ea7211496b4638f6514d0e5b9acc4939", "945e3ba63a0b9f577b1395204e13c3a231f9bc0223888be653286534e5873695"] +cffi = ["041c81822e9f84b1d9c401182e174996f0bae9991f33725d059b771744290774", "046ef9a22f5d3eed06334d01b1e836977eeef500d9b78e9ef693f9380ad0b83d", "066bc4c7895c91812eff46f4b1c285220947d4aa46fa0a2651ff85f2afae9c90", "066c7ff148ae33040c01058662d6752fd73fbc8e64787229ea8498c7d7f4041b", "2444d0c61f03dcd26dbf7600cf64354376ee579acad77aef459e34efcb438c63", "300832850b8f7967e278870c5d51e3819b9aad8f0a2c8dbe39ab11f119237f45", "34c77afe85b6b9e967bd8154e3855e847b70ca42043db6ad17f26899a3df1b25", "46de5fa00f7ac09f020729148ff632819649b3e05a007d286242c4882f7b1dc3", "4aa8ee7ba27c472d429b980c51e714a24f47ca296d53f4d7868075b175866f4b", "4d0004eb4351e35ed950c14c11e734182591465a33e960a4ab5e8d4f04d72647", "4e3d3f31a1e202b0f5a35ba3bc4eb41e2fc2b11c1eff38b362de710bcffb5016", "50bec6d35e6b1aaeb17f7c4e2b9374ebf95a8975d57863546fa83e8d31bdb8c4", "55cad9a6df1e2a1d62063f79d0881a414a906a6962bc160ac968cc03ed3efcfb", "5662ad4e4e84f1eaa8efce5da695c5d2e229c563f9d5ce5b0113f71321bcf753", "59b4dc008f98fc6ee2bb4fd7fc786a8d70000d058c2bbe2698275bc53a8d3fa7", "73e1ffefe05e4ccd7bcea61af76f36077b914f92b76f95ccf00b0c1b9186f3f9", "a1f0fd46eba2d71ce1589f7e50a9e2ffaeb739fb2c11e8192aa2b45d5f6cc41f", "a2e85dc204556657661051ff4bab75a84e968669765c8a2cd425918699c3d0e8", "a5457d47dfff24882a21492e5815f891c0ca35fefae8aa742c6c263dac16ef1f", "a8dccd61d52a8dae4a825cdbb7735da530179fea472903eb871a5513b5abbfdc", "ae61af521ed676cf16ae94f30fe202781a38d7178b6b4ab622e4eec8cefaff42", "b012a5edb48288f77a63dba0840c92d0504aa215612da4541b7b42d849bc83a3", "d2c5cfa536227f57f97c92ac30c8109688ace8fa4ac086d19d0af47d134e2909", "d42b5796e20aacc9d15e66befb7a345454eef794fdb0737d1af593447c6c8f45", "dee54f5d30d775f525894d67b1495625dd9322945e7fee00731952e0368ff42d", "e070535507bd6aa07124258171be2ee8dfc19119c28ca94c9dfb7efd23564512", "e1ff2748c84d97b065cc95429814cdba39bcbd77c9c85c89344b317dc0d9cbff", "ed851c75d1e0e043cbf5ca9a8e1b13c4c90f3fbd863dacb01c0808e2b5204201"] chardet = ["84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", "fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"] click = ["2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13", "5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"] colorama = ["05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d", "f8ac84de7840f5b9c4e3347b3c1eaa50f7e49c2b07596221daec5edaabbd7c48"] @@ -221,17 +322,23 @@ colorlog = ["3cf31b25cbc8f86ec01fef582ef3b840950dea414084ed19ab922c8b493f9b42", contextlib2 = ["509f9419ee91cdd00ba34443217d5ca51f5a364a404e1dce9e8979cea969ca48", "f5260a6e679d2ff42ec91ec5252f4eeffdcf21053db9113bd0a8e4d953769c00"] coverage = ["0c5fe441b9cfdab64719f24e9684502a59432df7570521563d7b1aff27ac755f", "2b412abc4c7d6e019ce7c27cbc229783035eef6d5401695dccba80f481be4eb3", "3684fabf6b87a369017756b551cef29e505cb155ddb892a7a29277b978da88b9", "39e088da9b284f1bd17c750ac672103779f7954ce6125fd4382134ac8d152d74", "3c205bc11cc4fcc57b761c2da73b9b72a59f8d5ca89979afb0c1c6f9e53c7390", "42692db854d13c6c5e9541b6ffe0fe921fe16c9c446358d642ccae1462582d3b", "465ce53a8c0f3a7950dfb836438442f833cf6663d407f37d8c52fe7b6e56d7e8", "48020e343fc40f72a442c8a1334284620f81295256a6b6ca6d8aa1350c763bbe", "4ec30ade438d1711562f3786bea33a9da6107414aed60a5daa974d50a8c2c351", "5296fc86ab612ec12394565c500b412a43b328b3907c0d14358950d06fd83baf", "5f61bed2f7d9b6a9ab935150a6b23d7f84b8055524e7be7715b6513f3328138e", "6899797ac384b239ce1926f3cb86ffc19996f6fa3a1efbb23cb49e0c12d8c18c", "68a43a9f9f83693ce0414d17e019daee7ab3f7113a70c79a3dd4c2f704e4d741", "6b8033d47fe22506856fe450470ccb1d8ba1ffb8463494a15cfc96392a288c09", "7ad7536066b28863e5835e8cfeaa794b7fe352d99a8cded9f43d1161be8e9fbd", "7bacb89ccf4bedb30b277e96e4cc68cd1369ca6841bde7b005191b54d3dd1034", "839dc7c36501254e14331bcb98b27002aa415e4af7ea039d9009409b9d2d5420", "8e679d1bde5e2de4a909efb071f14b472a678b788904440779d2c449c0355b27", "8f9a95b66969cdea53ec992ecea5406c5bd99c9221f539bca1e8406b200ae98c", "932c03d2d565f75961ba1d3cec41ddde00e162c5b46d03f7423edcb807734eab", "93f965415cc51604f571e491f280cff0f5be35895b4eb5e55b47ae90c02a497b", "988529edadc49039d205e0aa6ce049c5ccda4acb2d6c3c5c550c17e8c02c05ba", "998d7e73548fe395eeb294495a04d38942edb66d1fa61eb70418871bc621227e", "9de60893fb447d1e797f6bf08fdf0dbcda0c1e34c1b06c92bd3a363c0ea8c609", "9e80d45d0c7fcee54e22771db7f1b0b126fb4a6c0a2e5afa72f66827207ff2f2", "a545a3dfe5082dc8e8c3eb7f8a2cf4f2870902ff1860bd99b6198cfd1f9d1f49", "a5d8f29e5ec661143621a8f4de51adfb300d7a476224156a39a392254f70687b", "a9abc8c480e103dc05d9b332c6cc9fb1586330356fc14f1aa9c0ca5745097d19", "aca06bfba4759bbdb09bf52ebb15ae20268ee1f6747417837926fae990ebc41d", "bb23b7a6fd666e551a3094ab896a57809e010059540ad20acbeec03a154224ce", "bfd1d0ae7e292105f29d7deaa9d8f2916ed8553ab9d5f39ec65bcf5deadff3f9", "c22ab9f96cbaff05c6a84e20ec856383d27eae09e511d3e6ac4479489195861d", "c62ca0a38958f541a73cf86acdab020c2091631c137bd359c4f5bddde7b75fd4", "c709d8bda72cf4cd348ccec2a4881f2c5848fd72903c185f363d361b2737f773", "c968a6aa7e0b56ecbd28531ddf439c2ec103610d3e2bf3b75b813304f8cb7723", "ca58eba39c68010d7e87a823f22a081b5290e3e3c64714aac3c91481d8b34d22", "df785d8cb80539d0b55fd47183264b7002077859028dfe3070cf6359bf8b2d9c", "f406628ca51e0ae90ae76ea8398677a921b36f0bd71aab2099dfed08abd0322f", "f46087bbd95ebae244a0eda01a618aff11ec7a069b15a3ef8f6b520db523dcf1", "f8019c5279eb32360ca03e9fac40a12667715546eed5c5eb59eb381f2f501260", "fc5f4d209733750afd2714e9109816a29500718b32dd9a5db01c0cb3a019b96a"] coveralls = ["d3d49234bffd41e91b241a69f0ebb9f64d7f0515711a76134d53d4647e7eb509", "dafabcff87425fa2ab3122dee21229afbb4d6692cfdacc6bb895f7dfa8b2c849"] +cryptography = ["24b61e5fcb506424d3ec4e18bca995833839bf13c59fc43e530e488f28d46b8c", "25dd1581a183e9e7a806fe0543f485103232f940fcfc301db65e630512cce643", "3452bba7c21c69f2df772762be0066c7ed5dc65df494a1d53a58b683a83e1216", "41a0be220dd1ed9e998f5891948306eb8c812b512dc398e5a01846d855050799", "5751d8a11b956fbfa314f6553d186b94aa70fdb03d8a4d4f1c82dcacf0cbe28a", "5f61c7d749048fa6e3322258b4263463bfccefecb0dd731b6561cb617a1d9bb9", "72e24c521fa2106f19623a3851e9f89ddfdeb9ac63871c7643790f872a305dfc", "7b97ae6ef5cba2e3bb14256625423413d5ce8d1abb91d4f29b6d1a081da765f8", "961e886d8a3590fd2c723cf07be14e2a91cf53c25f02435c04d39e90780e3b53", "96d8473848e984184b6728e2c9d391482008646276c3ff084a1bd89e15ff53a1", "ae536da50c7ad1e002c3eee101871d93abdc90d9c5f651818450a0d3af718609", "b0db0cecf396033abb4a93c95d1602f268b3a68bb0a9cc06a7cff587bb9a7292", "cfee9164954c186b191b91d4193989ca994703b2fff406f71cf454a2d3c7327e", "e6347742ac8f35ded4a46ff835c60e68c22a536a8ae5c4422966d06946b6d4c6", "f27d93f0139a3c056172ebb5d4f9056e770fdf0206c2f422ff2ebbad142e09ed", "f57b76e46a58b63d1c6375017f4564a28f19a5ca912691fd2e4261b3414b618d"] docopt = ["49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"] +enum34 = ["2d81cbbe0e73112bdfe6ef8576f2238f2ba27dd0d55752a776c41d38b7da2850", "644837f692e5f550741432dd3f223bbb9852018674981b1664e5dc339387588a", "6bd0f6ad48ec2aa117d3d141940d484deccda84d4fcd884f5c3d93c23ecd8c79", "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1"] filetype = ["17a3b885f19034da29640b083d767e0f13c2dcb5dcc267945c8b6e5a5a9013c7", "4967124d982a71700d94a08c49c4926423500e79382a92070f5ab248d44fe461"] flask = ["2ea22336f6d388b4b242bc3abf8a01244a8aa3e236e7407469ef78c16ba355dd", "6c02dbaa5a9ef790d8219bdced392e2d549c10cd5a5ba4b6aa65126b2271af29"] future = ["67045236dcfd6816dc439556d009594abf643e5eb48992e36beac09c2ca659b8"] har2case = ["84d3a5cc9fbb16e45372e7e880a936c59bbe8e9b66bad81927769e64f608e2af", "8f159ec7cba82ec4282f46af4a9dac89f65e62796521b2426d3c89c3c9fd8579"] idna = ["c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407", "ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"] +ipaddress = ["64b28eec5e78e7510698f6d4da08800a5c575caa4a286c93d651c5d3ff7b6794", "b146c751ea45cad6188dd6cf2d9b757f6f4f8d6ffb96a023e6f2e26eea02a72c"] itsdangerous = ["321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19", "b12271b2047cb23eeb98c8b5622e2e5c5e9abd9784a153e9d8ef9cb4dd09d749"] jinja2 = ["065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013", "14dd6caf1527abb21f08f86c784eac40853ba93edb79552aa1e4b8aef1b61c7b"] markupsafe = ["00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473", "09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161", "09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235", "1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5", "24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff", "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b", "43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1", "46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e", "500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183", "535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66", "62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1", "6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1", "717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e", "79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b", "7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905", "88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735", "8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d", "98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e", "9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d", "9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c", "ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21", "b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2", "b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5", "b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b", "ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6", "c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f", "cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f", "e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"] +pycparser = ["a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3"] +pyopenssl = ["aeca66338f6de19d1aa46ed634c3b9ae519a64b458f8468aec688e7e3c20f200", "c727930ad54b10fc157015014b666f2d8b41f70c0d03e83ab67624fd3dd5d1e6"] pyyaml = ["57acc1d8533cbe51f6662a55434f0dbecfa2b9eaf115bede8f6fd00115a0c0d3", "588c94b3d16b76cfed8e0be54932e5729cc185caffaa5a451e7ad2f7ed8b4043", "68c8dd247f29f9a0d09375c9c6b8fdc64b60810ebf07ba4cdd64ceee3a58c7b7", "70d9818f1c9cd5c48bb87804f2efc8692f1023dac7f1a1a5c61d454043c1d265", "86a93cccd50f8c125286e637328ff4eef108400dd7089b46a7be3445eecfa391", "a0f329125a926876f647c9fa0ef32801587a12328b4a3c741270464e3e4fa778", "a3c252ab0fa1bb0d5a3f6449a4826732f3eb6c0270925548cac342bc9b22c225", "b4bb4d3f5e232425e25dda21c070ce05168a786ac9eda43768ab7f3ac2770955", "cd0618c5ba5bda5f4039b9398bb7fb6a317bb8298218c3de25c47c4740e4b95e", "ceacb9e5f8474dcf45b940578591c7f3d960e82f926c707788a570b51ba59190", "fe6a88094b64132c4bb3b631412e90032e8cfe9745a58370462240b8cb7553cd"] -requests = ["502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e", "7bf2a778576d825600030a110f3c0e3e8edc51dfaafe1c146e39a2027784957b"] -requests-toolbelt = ["380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f", "968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"] +requests = ["11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4", "9cf5292fcd0f598c671cfc1e0d7d1a7f13bb8085e9a590f48c010551dc6c4b31"] +requests-toolbelt = ["42c9c170abc2cacb78b8ab23ac957945c7716249206f90874651971a4acff237", "f6a531936c6fa4c6cfce1b9c10d5c4f498d16528d2a54a22ca00011205a187b5"] +six = ["3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c", "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73"] urllib3 = ["2393a695cd12afedd0dcb26fe5d50d0cf248e5a66f75dbd89a3d4eb333a61af4", "a637e5fae88995b256e3409dc4d52c2e2e0ba32c42a6365fee8bbd2238de3cfb"] -werkzeug = ["865856ebb55c4dcd0630cdd8f3331a1847a819dda7e8c750d3db6f2aa6c0209c", "a0b915f0815982fb2a09161cb8f31708052d0951c3ba433ccc5e1aa276507ca6"] +werkzeug = ["87ae4e5b5366da2347eb3116c0e6c681a0e939a33b2805e2c0cbd282664932c4", "a13b74dd3c45f758d4ebdb224be8f1ab8ef58b3c0ffc1783a8c7d9f4f50227e6"] From b1babfeda19509f50b18e283be08f18a105421bd Mon Sep 17 00:00:00 2001 From: debugtalk Date: Thu, 18 Jul 2019 17:36:50 +0800 Subject: [PATCH 13/16] improvement: relocate debugging scripts --- httprunner/cli.py | 24 ++++++++++++++++++++++++ main-debug.py | 19 ------------------- 2 files changed, 24 insertions(+), 19 deletions(-) delete mode 100644 main-debug.py diff --git a/httprunner/cli.py b/httprunner/cli.py index 677f7be8..0e65ea4a 100644 --- a/httprunner/cli.py +++ b/httprunner/cli.py @@ -176,3 +176,27 @@ def main_locust(): locusts.run_locusts_with_processes(sys.argv, processes_count) else: locusts.start_locust_main() + + +if __name__ == "__main__": + """ debugging mode + """ + import sys + if len(sys.argv) == 0: + exit(0) + + cmd = sys.argv.pop(1) + + if cmd in ["hrun", "httprunner", "ate"]: + main_hrun() + elif cmd in ["locust", "locusts"]: + main_locust() + else: + from httprunner.logger import color_print + color_print("Miss debugging type.", "RED") + example = "\n".join([ + "e.g.", + "python main-debug.py hrun /path/to/testcase_file", + "python main-debug.py locusts -f /path/to/testcase_file" + ]) + color_print(example, "yellow") diff --git a/main-debug.py b/main-debug.py deleted file mode 100644 index 04fd39b1..00000000 --- a/main-debug.py +++ /dev/null @@ -1,19 +0,0 @@ -import sys - -from httprunner.cli import main_hrun, main_locust -from httprunner.logger import color_print - -cmd = sys.argv.pop(1) - -if cmd in ["hrun", "httprunner", "ate"]: - main_hrun() -elif cmd in ["locust", "locusts"]: - main_locust() -else: - color_print("Miss debugging type.", "RED") - example = "\n".join([ - "e.g.", - "python main-debug.py hrun /path/to/testcase_file", - "python main-debug.py locusts -f /path/to/testcase_file" - ]) - color_print(example, "yellow") From d108209fe79ead795bfcbe5f6fb853292b61b0ed Mon Sep 17 00:00:00 2001 From: debugtalk Date: Thu, 18 Jul 2019 18:04:18 +0800 Subject: [PATCH 14/16] remove docs, move docs to universal repo https://github.com/HttpRunner/docs --- .travis.yml | 4 +- docs/CNAME | 1 - docs/FAQ.md | 20 -- docs/Installation.md | 96 ------ docs/Introduction.md | 28 -- docs/dev-rules.md | 47 --- docs/development.md | 23 -- docs/images/ate-quickstart-demo-report.jpg | Bin 40427 -> 0 bytes docs/images/ate-quickstart-http-1.jpg | Bin 114965 -> 0 bytes docs/images/ate-quickstart-http-2.jpg | Bin 108744 -> 0 bytes docs/images/github-flow.png | Bin 21040 -> 0 bytes docs/images/locusts-full-speed.jpg | Bin 65133 -> 0 bytes docs/images/qrcode_for_httprunner.jpg | Bin 27646 -> 0 bytes docs/index.md | 3 - docs/load-test.md | 45 --- docs/quickstart.md | 336 --------------------- docs/run-testcases.md | 34 --- docs/write-testcases.md | 142 --------- mkdocs.yml | 15 - 19 files changed, 2 insertions(+), 792 deletions(-) delete mode 100644 docs/CNAME delete mode 100644 docs/FAQ.md delete mode 100644 docs/Installation.md delete mode 100644 docs/Introduction.md delete mode 100644 docs/dev-rules.md delete mode 100644 docs/development.md delete mode 100644 docs/images/ate-quickstart-demo-report.jpg delete mode 100644 docs/images/ate-quickstart-http-1.jpg delete mode 100644 docs/images/ate-quickstart-http-2.jpg delete mode 100644 docs/images/github-flow.png delete mode 100644 docs/images/locusts-full-speed.jpg delete mode 100644 docs/images/qrcode_for_httprunner.jpg delete mode 100644 docs/index.md delete mode 100644 docs/load-test.md delete mode 100644 docs/quickstart.md delete mode 100644 docs/run-testcases.md delete mode 100644 docs/write-testcases.md delete mode 100644 mkdocs.yml diff --git a/.travis.yml b/.travis.yml index b0f4f2b8..1d917f66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,8 @@ python: matrix: include: - python: 3.7 - dist: xenial - sudo: true + dist: xenial # Required for Python 3.7 + sudo: true # Required for Python 3.7 install: - pip install poetry - poetry install -vvv diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index bdbfd759..00000000 --- a/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -httprunner.org \ No newline at end of file diff --git a/docs/FAQ.md b/docs/FAQ.md deleted file mode 100644 index 38583eb8..00000000 --- a/docs/FAQ.md +++ /dev/null @@ -1,20 +0,0 @@ -## Unable to install PyUnitReport dependency library automatically - -If there is something goes wrong in installation like below. - -```text -Downloading/unpacking PyUnitReport (from HttpRunner) - Could not find any downloads that satisfy the requirement PyUnitReport (from HttpRunner) -``` - -You could install `PyUnitReport` manully at first. - -```bash -$ pip install git+https://github.com/debugtalk/PyUnitReport.git#egg=PyUnitReport -``` - -And then everything will be OK when you reinstall `HttpRunner`. - -```bash -$ pip install git+https://github.com/debugtalk/HttpRunner.git#egg=HttpRunner -``` diff --git a/docs/Installation.md b/docs/Installation.md deleted file mode 100644 index d13a44af..00000000 --- a/docs/Installation.md +++ /dev/null @@ -1,96 +0,0 @@ -## Installation - -`HttpRunner` is available on [`PyPI`][PyPI] and can be installed through pip or easy_install. - -```bash -$ pip install HttpRunner -``` - -or - -```bash -$ easy_install HttpRunner -``` - -If you want to keep up with the latest version, you can install with github repository url. - -```bash -$ pip install git+https://github.com/HttpRunner/HttpRunner.git#egg=HttpRunner -``` - -## Upgrade - -If you have installed `HttpRunner` before and want to upgrade to the latest version, you can use the `-U` option. - -This option works on each installation method described above. - -```bash -$ pip install -U HttpRunner -$ easy_install -U HttpRunner -$ pip install -U git+https://github.com/HttpRunner/HttpRunner.git#egg=HttpRunner -``` - -## Check Installation - -When HttpRunner is installed, a **httprunner** (**hrun** for short) command should be available in your shell (if you're not using -virtualenv—which you should—make sure your python script directory is on your path). - -To see `HttpRunner` version: - -```bash -$ httprunner -V # same as: hrun -V -HttpRunner version: 0.8.1b -PyUnitReport version: 0.1.3b -``` - -To see available options, run: - -```bash -$ httprunner -h # same as: hrun -h -usage: main-debug.py [-h] [-V] [--no-html-report] - [--html-report-name HTML_REPORT_NAME] - [--html-report-template HTML_REPORT_TEMPLATE] - [--log-level LOG_LEVEL] [--log-file LOG_FILE] - [--dot-env-path DOT_ENV_PATH] [--failfast] - [--startproject STARTPROJECT] - [--validate [VALIDATE [VALIDATE ...]]] - [--prettify [PRETTIFY [PRETTIFY ...]]] - [testcase_paths [testcase_paths ...]] - -One-stop solution for HTTP(S) testing. - -positional arguments: - testcase_paths testcase file path - -optional arguments: - -h, --help show this help message and exit - -V, --version show version - --no-html-report do not generate html report. - --html-report-name HTML_REPORT_NAME - specify html report name, only effective when - generating html report. - --html-report-template HTML_REPORT_TEMPLATE - specify html report template path. - --log-level LOG_LEVEL - Specify logging level, default is INFO. - --log-file LOG_FILE Write logs to specified file path. - --dot-env-path DOT_ENV_PATH - Specify .env file path, which is useful for keeping - sensitive data. - --failfast Stop the test run on the first error or failure. - --startproject STARTPROJECT - Specify new project name. - --validate [VALIDATE [VALIDATE ...]] - Validate JSON testcase format. - --prettify [PRETTIFY [PRETTIFY ...]] - Prettify JSON testcase format. -``` - -## Supported Python Versions - -HttpRunner supports Python 2.7, 3.4, 3.5, and 3.6. And we strongly recommend you to use `Python 3.6`. - -`HttpRunner` has been tested on `macOS`, `Linux` and `Windows` platforms. - - -[PyPI]: https://pypi.python.org/pypi diff --git a/docs/Introduction.md b/docs/Introduction.md deleted file mode 100644 index dc65f2ca..00000000 --- a/docs/Introduction.md +++ /dev/null @@ -1,28 +0,0 @@ -# Introduction - -## Design Philosophy - -Take full reuse of Python's existing powerful libraries: [`Requests`][requests], [`unittest`][unittest] and [`Locust`][Locust]. And achieve the goal of API automation test, production environment monitoring, and API performance test, with a concise and elegant manner. - -## Key Features - -- Inherit all powerful features of [`Requests`][requests], just have fun to handle HTTP in human way. -- Define testcases in YAML or JSON format in concise and elegant manner. -- Supports `function`/`variable`/`extract`/`validate` mechanisms to create full test scenarios. -- With `debugtalk.py` plugin, module functions can be auto-discovered in recursive upward directories. -- Testcases can be run in diverse ways, with single testcase, multiple testcases, or entire project folder. -- Test report is concise and clear, with detailed log records. See [`PyUnitReport`][PyUnitReport]. -- With reuse of [`Locust`][Locust], you can run performance test without extra work. -- CLI command supported, perfect combination with [Jenkins][Jenkins]. - -## Learn more - -You can read this [blog][HttpRunner-blog] to learn more about the background and initial thoughts of `HttpRunner`. - - -[requests]: http://docs.python-requests.org/en/master/ -[unittest]: https://docs.python.org/3/library/unittest.html -[Locust]: http://locust.io/ -[PyUnitReport]: https://github.com/HttpRunner/PyUnitReport -[Jenkins]: https://jenkins.io/index.html -[HttpRunner-blog]: http://debugtalk.com/post/ApiTestEngine-api-test-best-practice/ diff --git a/docs/dev-rules.md b/docs/dev-rules.md deleted file mode 100644 index f9dfb589..00000000 --- a/docs/dev-rules.md +++ /dev/null @@ -1,47 +0,0 @@ - -## 版本号(Version) - -从 2.0 版本开始,HttpRunner 开始使用 [`Semantic Versioning`][SemVer] 版本号机制。该机制由 GitHub 联合创始人 Tom Preston-Werner 编写,当前被广泛采用,遵循该机制也可以更好地与开源生态统一,避免出现 “dependency hell” 的情况。 - -具体地,HttpRunner 将采用 `MAJOR.MINOR.PATCH` 的版本号机制。 - -- MAJOR: 重大版本升级并出现前后版本不兼容时加 1 -- MINOR: 大版本内新增功能并且保持版本内兼容性时加 1 -- PATCH: 功能迭代过程中进行问题修复(bugfix)时加 1 - -当然,在实际迭代开发过程中,肯定也不会每次提交(commit)都对 PATCH 加 1;在遵循如上主体原则的前提下,也会根据需要,在版本号后面添加先行版本号(-alpha/beta/rc)或版本编译元数据(+20190101)作为延伸。 - -## 分支策略 - -HttpRunner 的开发分支策略采用 GitHub Flow。 - -![](images/github-flow.png) - -## 提交信息(Commit Message) - -代码提交的注释信息遵循如下格式规范: - -```xml -(): - - - -