{ "info": { "author": "Arjun G. Menon", "author_email": "contact@arjungmenon.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "License :: OSI Approved :: Apache Software License", "Topic :: Software Development :: Quality Assurance", "Topic :: Software Development :: Testing" ], "description": "test_cmd |pypi|\n===============\nThis is a tool for black-box testing command-line programs simply based on STDIN, STDOUT, and STDERR.\n\nTutorial\n--------\nTest cases usually consist of pairs of input and output files, as well as an optional ``tests.json`` file specifying applicable command-line arguments. The input file is piped in via ``STDIN``. If the command being tested emits the expected output file via ``STDOUT``, the test case passes. A file representing an expected ``STDERR`` output can also optionally be specified.\n\nThe input/output file pairs must follow this naming pattern::\n\n test-A.in.txt -> test-A.out.txt\n test-B.in.txt -> test-B.out.txt, test-B.err.txt\n test-C.in.txt -> test-C.out.txt\n\nThe file extension (``.txt`` here) can be anything. The file naming pattern is ``*.in*`` for input files, ``*.out*`` for expected output files, and ``*.err*`` for expected error files. The content of the ``*.in.*`` file is piped to the command being tested, and its ``STDOUT`` is compared against the ``*.out*`` file. If a ``*.err.*`` file has been provided, then the command ``STDERR`` is matched against it as well.\n\nFor an example of test_cmd in action, see the `pypage project `_, particularly its `tests folder `_.\n\nUsage\n*****\n::\n\n usage: test_cmd.py [-h] tests_dir cmd ...\n\n Functional Testing Utility for Command-Line Applications\n\n positional arguments:\n tests_dir Path to the directory containing test cases\n cmd Path to the command to be tested\n args The command-line arguments with an ampersand character '@'\n markingwhere arguments from test.json should be injected\n\n optional arguments:\n -h, --help show this help message and exit\n\nCommand-line arguments for test cases can be specified by creating a special file named ``tests.json``, and placing it in the directory containing your test cases. This ``tests.json`` file maps test cases to objects representing command-line arguments for that test case. If a command-line argument is a non-string value (e.g. a complex JavaScript object), the argument is stringified (with Python's ``json.dumps``), and passed in as JSON.\n\n.. |pypi| image:: https://badge.fury.io/py/test_cmd.svg\n :target: https://pypi.python.org/pypi/test_cmd", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/arjun-menon/test_cmd/tarball/2.0.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/arjun-menon/test_cmd", "keywords": "command line terminal functional black box testing arguments stdin stdout stderr", "license": "Apache", "maintainer": "", "maintainer_email": "", "name": "test_cmd", "package_url": "https://pypi.org/project/test_cmd/", "platform": "", "project_url": "https://pypi.org/project/test_cmd/", "project_urls": { "Download": "https://github.com/arjun-menon/test_cmd/tarball/2.0.1", "Homepage": "https://github.com/arjun-menon/test_cmd" }, "release_url": "https://pypi.org/project/test_cmd/2.0.1/", "requires_dist": null, "requires_python": "", "summary": "Tool for black-box testing command-line programs using STDIN, STDOUT and STDERR", "version": "2.0.1" }, "last_serial": 4165487, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "1952c480002040c0f628b14ace3514f3", "sha256": "b2257155e8ea85d83e37b6e4a16e0b9aae76b649cdbc3213de79b3d731d6e9c7" }, "downloads": -1, "filename": "test_cmd-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1952c480002040c0f628b14ace3514f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4796, "upload_time": "2016-11-03T23:11:23", "url": "https://files.pythonhosted.org/packages/6a/25/a3c5348492b1361a1d2f2bbcc420ca2297d1cb92271f9e32d3030b1f53e5/test_cmd-1.0.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "09d4c3b3d050ae2e7d2d37b9de38decc", "sha256": "a0892a2febd0b8306a905ad273f78f8b7e890ae14811c8fd70884653bae85960" }, "downloads": -1, "filename": "test_cmd-2.0.0.tar.gz", "has_sig": false, "md5_digest": "09d4c3b3d050ae2e7d2d37b9de38decc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5018, "upload_time": "2018-08-13T12:52:42", "url": "https://files.pythonhosted.org/packages/57/b1/ce59a5752403a70d663331fdd5493877fd6de51878911019b2854d2d3fa6/test_cmd-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "13abf81e4e45d63ee6476434ada00897", "sha256": "fac6b61636d2e2a35aaa0795851d19679e8e892235bc704f30c3ed5f6aa002db" }, "downloads": -1, "filename": "test_cmd-2.0.1.tar.gz", "has_sig": false, "md5_digest": "13abf81e4e45d63ee6476434ada00897", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5085, "upload_time": "2018-08-13T14:11:44", "url": "https://files.pythonhosted.org/packages/69/81/4ab11b36738161be1ab916504263ab358eb2877e371af8e173a4215b9aff/test_cmd-2.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "13abf81e4e45d63ee6476434ada00897", "sha256": "fac6b61636d2e2a35aaa0795851d19679e8e892235bc704f30c3ed5f6aa002db" }, "downloads": -1, "filename": "test_cmd-2.0.1.tar.gz", "has_sig": false, "md5_digest": "13abf81e4e45d63ee6476434ada00897", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5085, "upload_time": "2018-08-13T14:11:44", "url": "https://files.pythonhosted.org/packages/69/81/4ab11b36738161be1ab916504263ab358eb2877e371af8e173a4215b9aff/test_cmd-2.0.1.tar.gz" } ] }