hitchstory


Namehitchstory JSON
Version 0.24.0 PyPI version JSON
download
home_page
SummaryType-safe YAML-based example specification driven development framework for python.
upload_time2024-01-14 10:28:23
maintainer
docs_urlNone
author
requires_python>=3.7.0
licenseElastic License 2.0 URL: https://www.elastic.co/licensing/elastic-license ## Acceptance By using the software, you agree to all of the terms and conditions below. ## Copyright License The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below. ## Limitations You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software. You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key. You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law. ## Patents The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company. ## Notices You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms. If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software. ## No Other Rights These terms do not imply any licenses other than those expressly granted in these terms. ## Termination If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently. ## No Liability *As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.* ## Definitions The **licensor** is the entity offering these terms, and the **software** is the software the licensor makes available under these terms, including any portion of it. **you** refers to the individual or entity agreeing to these terms. **your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect. **your licenses** are all the licenses granted to you for the software under these terms. **use** means anything you do with the software requiring one of your licenses. **trademark** means trademarks, service marks, and similar rights.
keywords yaml hitchdev bdd tdd testing tests
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # HitchStory

[![Main branch status](https://github.com/hitchdev/hitchstory/actions/workflows/regression.yml/badge.svg)](https://github.com/hitchdev/hitchstory/actions/workflows/regression.yml)

Type-safe [StrictYAML](https://hitchdev.com/hitchstory/why/strictyaml) python integration testing framework. With this
framework, your tests can:

## Rewrite themselves from program output (command line test example)

![Test rewriting itself](https://hitchdev-videos.netlify.app/rewrite-demo.gif)

## Autogenerate documentation (website test example)

![Test writing docs](https://hitchdev-videos.netlify.app/rewrite-docs-demo.gif)

The tests can be run on their own or as pytest tests. 

## Demo projects with demo tests

Project | Storytests | Python code | Doc template | Autogenerated docs
---|---|---|---|---
[Website](https://github.com/hitchdev/hitchstory/tree/master/examples/website) | [add todo](https://github.com/hitchdev/hitchstory/tree/master/examples/website/hitch/story/add-todo.story), [correct spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/website/hitch/story/correct-my-spelling.story) | [engine.py](https://github.com/hitchdev/hitchstory/tree/master/examples/website/hitch/engine.py) | [docstory.yml](https://github.com/hitchdev/hitchstory/tree/master/examples/website/hitch/docstory.yml) | [Add todo](https://github.com/hitchdev/hitchstory/blob/master/examples/website/hitch/docs/add-and-retrieve-todo.md), [Correct my spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/website/hitch/docs/correct-my-spelling.md)
[REST API](https://github.com/hitchdev/hitchstory/tree/master/examples/restapi) | [add todo](https://github.com/hitchdev/hitchstory/tree/master/examples/restapi/hitch/story/add-todo.story), [correct spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/restapi/hitch/story/correct-my-spelling.story) | [engine.py](https://github.com/hitchdev/hitchstory/tree/master/examples/restapi/hitch/engine.py) | [docstory.yml](https://github.com/hitchdev/hitchstory/tree/master/examples/restapi/hitch/docstory.yml) | [Add todo](https://github.com/hitchdev/hitchstory/blob/master/examples/restapi/hitch/docs/add-and-retrieve-todo.md), [Correct my spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/restapi/hitch/docs/correct-my-spelling.md)
[Interactive command line app](https://github.com/hitchdev/hitchstory/tree/master/examples/commandline) | [add todo](https://github.com/hitchdev/hitchstory/tree/master/examples/commandline/story/add-todo.story), [correct spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/commandline/story/correct-my-spelling.story) | [test_integration.py](https://github.com/hitchdev/hitchstory/tree/master/examples/commandline/tests/test_integration.py) | [docstory.yml](https://github.com/hitchdev/hitchstory/tree/master/examples/commandline/tests/docstory.yml) | [Add todo](https://github.com/hitchdev/hitchstory/blob/master/examples/commandline/docs/add-and-retrieve-todo.md), [Correct my spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/commandline/docs/correct-my-spelling.md)
[A Python API](https://github.com/hitchdev/hitchstory/tree/master/examples/pythonapi) | [add todo](https://github.com/hitchdev/hitchstory/tree/master/examples/pythonapi/story/add-todo.story), [correct spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/pythonapi/story/correct-my-spelling.story) | [test_integration.py](https://github.com/hitchdev/hitchstory/tree/master/examples/pythonapi/tests/test_integration.py) | [docstory.yml](https://github.com/hitchdev/hitchstory/tree/master/examples/pythonapi/tests/docstory.yml) | [Add todo](https://github.com/hitchdev/hitchstory/blob/master/examples/pythonapi/docs/add-and-retrieve-todo.md), [Correct my spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/pythonapi/docs/correct-my-spelling.md)






# Code Example



example.story:

```yaml
Logged in:
  given:
    website: /login  # preconditions
  steps:
  - Form filled:
      username: AzureDiamond
      password: hunter2
  - Clicked: login


Email sent:
  about: |
    The most basic email with no subject, cc or bcc
    set.
  based on: logged in             # inherits from and continues from test above
  following steps:
  - Clicked: new email
  - Form filled:
      to: Cthon98@aol.com
      contents: |                # long form text
        Hey guys,

        I think I got hacked!
  - Clicked: send email
  - Email was sent
```
engine.py:

```python
from hitchstory import BaseEngine, GivenDefinition, GivenProperty
from hitchstory import Failure, strings_match
from strictyaml import Str

class Engine(BaseEngine):
    given_definition = GivenDefinition(
        website=GivenProperty(Str()),
    )
    
    def __init__(self, rewrite=False):
        self._rewrite = rewrite

    def set_up(self):
        print(f"Load web page at {self.given['website']}")

    def form_filled(self, **textboxes):
        for name, contents in sorted(textboxes.items()):
            print(f"Put {contents} in name")

    def clicked(self, name):
        print(f"Click on {name}")
    
    def failing_step(self):
        raise Failure("This was not supposed to happen")
    
    def error_message_displayed(self, expected_message):
        """Demonstrates steps that can rewrite themselves."""
        actual_message = "error message!"
        try:
            strings_match(expected_message, actual_message)
        except Failure:
            if self._rewrite:
                self.current_step.rewrite("expected_message").to(actual_message)
            else:
                raise

    def email_was_sent(self):
        print("Check email was sent!")
```






```python
>>> from hitchstory import StoryCollection
>>> from pathlib import Path
>>> from engine import Engine
>>> 
>>> StoryCollection(Path(".").glob("*.story"), Engine()).named("Email sent").play()
RUNNING Email sent in /path/to/working/example.story ... Load web page at /login
Put hunter2 in name
Put AzureDiamond in name
Click on login
Click on new email
Put Hey guys,

I think I got hacked!
 in name
Put Cthon98@aol.com in name
Click on send email
Check email was sent!
SUCCESS in 0.1 seconds.
```








## Install

```bash
$ pip install hitchstory
```

## Community

Help is available if you ask questions in these places: [Github discussions](https://github.com/hitchdev/hitchstory/discussions) | [Github issues](https://github.com/hitchdev/hitchstory/issues) (not just for bugs) | [Slack channel](https://join.slack.com/t/hitchstory/shared_invite/zt-1uvrtozlz-vK92y5HN4SETkriUbBIHUQ)

## Using HitchStory

Every feature of this library is documented and listed below.
It is tested and documented with itself.


## Using HitchStory: With Pytest

If you already have pytest set up, you can quickly and easily write
a test using hitchstory that runs alongside your other pytest tests:

- [Self rewriting tests with pytest and hitchstory](https://hitchdev.com/hitchstory/using/pytest/rewrite)


## Using HitchStory: Engine

How to use the different features of the story engine:

- [Hiding stacktraces for expected exceptions](https://hitchdev.com/hitchstory/using/engine/expected-exceptions)
- [Given preconditions](https://hitchdev.com/hitchstory/using/engine/given)
- [Gradual typing of story steps](https://hitchdev.com/hitchstory/using/engine/gradual-typing)
- [Match two JSON snippets](https://hitchdev.com/hitchstory/using/engine/match-json)
- [Match two strings and show diff on failure](https://hitchdev.com/hitchstory/using/engine/match-two-strings)
- [Extra story metadata - e.g. adding JIRA ticket numbers to stories](https://hitchdev.com/hitchstory/using/engine/metadata)
- [Story with parameters](https://hitchdev.com/hitchstory/using/engine/parameterized-stories)
- [Story that rewrites given preconditions](https://hitchdev.com/hitchstory/using/engine/rewrite-given)
- [Story that rewrites itself](https://hitchdev.com/hitchstory/using/engine/rewrite-story)
- [Story that rewrites the sub key of an argument](https://hitchdev.com/hitchstory/using/engine/rewrite-subkey-of-argument)
- [Raising a Failure exception to conceal the stacktrace](https://hitchdev.com/hitchstory/using/engine/special-failure-exception)
- [Arguments to steps](https://hitchdev.com/hitchstory/using/engine/steps-and-step-arguments)
- [Strong typing](https://hitchdev.com/hitchstory/using/engine/strong-typing)


## Using HitchStory: Documentation Generation

How to autogenerate documentation from your tests:

- [Generate documentation with extra variables and functions](https://hitchdev.com/hitchstory/using/documentation/extra)
- [Generate documentation from story](https://hitchdev.com/hitchstory/using/documentation/generate)


## Using HitchStory: Inheritance

Inheriting stories from each other:

- [Inherit one story from another simply](https://hitchdev.com/hitchstory/using/inheritance/about)
- [Story inheritance - given mapping preconditions overridden](https://hitchdev.com/hitchstory/using/inheritance/override-given-mapping)
- [Story inheritance - override given scalar preconditions](https://hitchdev.com/hitchstory/using/inheritance/override-given-scalar)
- [Story inheritance - parameters](https://hitchdev.com/hitchstory/using/inheritance/parameters)
- [Story inheritance - steps](https://hitchdev.com/hitchstory/using/inheritance/steps)
- [Variations](https://hitchdev.com/hitchstory/using/inheritance/variations)


## Using HitchStory: Runner

Running the stories in different ways:

- [Continue on failure when playing multiple stories](https://hitchdev.com/hitchstory/using/runner/continue-on-failure)
- [Flaky story detection](https://hitchdev.com/hitchstory/using/runner/flaky-story-detection)
- [Play multiple stories in sequence](https://hitchdev.com/hitchstory/using/runner/play-multiple-stories-in-sequence)
- [Run one story in collection](https://hitchdev.com/hitchstory/using/runner/run-just-one-story)
- [Shortcut lookup for story names](https://hitchdev.com/hitchstory/using/runner/shortcut-lookup)


## Approach to using HitchStory

Best practices, how the tool was meant to be used, etc.

- [Is HitchStory a BDD tool? How do I do BDD with hitchstory?](https://hitchdev.com/hitchstory/approach/bdd)
- [Complementary tools](https://hitchdev.com/hitchstory/approach/complementary-tools)
- [Domain Appropriate Scenario Language (DASL)](https://hitchdev.com/hitchstory/approach/domain-appropriate-scenario-language-dasl)
- [Executable specifications](https://hitchdev.com/hitchstory/approach/executable-specifications)
- [Flaky Tests](https://hitchdev.com/hitchstory/approach/flaky-tests)
- [The Hermetic End to End Testing Pattern](https://hitchdev.com/hitchstory/approach/hermetic-end-to-end-test)
- [ANTIPATTERN - Analysts writing stories for the developer](https://hitchdev.com/hitchstory/approach/human-writable)
- [Snapshot Test Driven Development (STDD)](https://hitchdev.com/hitchstory/approach/snapshot-test-driven-development-stdd)
- [Test Artefact Environment Isolation](https://hitchdev.com/hitchstory/approach/test-artefact-environment-isolation)
- [Test concern leakage](https://hitchdev.com/hitchstory/approach/test-concern-leakage)
- [Tests as an investment](https://hitchdev.com/hitchstory/approach/test-investment)
- [What is the difference betweeen a test and a story?](https://hitchdev.com/hitchstory/approach/test-or-story)
- [The importance of test realism](https://hitchdev.com/hitchstory/approach/test-realism)
- [Testing non-deterministic code](https://hitchdev.com/hitchstory/approach/testing-nondeterministic-code)
- [Specification Documentation Test Triality](https://hitchdev.com/hitchstory/approach/triality)


## Design decisions and principles

Design decisions are justified here:

- [Declarative User Stories](https://hitchdev.com/hitchstory/why/declarative)
- [Why does hitchstory mandate the use of given but not when and then?](https://hitchdev.com/hitchstory/why/given-when-then)
- [Why is inheritance a feature of hitchstory stories?](https://hitchdev.com/hitchstory/why/inheritance)
- [Why does hitchstory not have an opinion on what counts as interesting to "the business"?](https://hitchdev.com/hitchstory/why/interesting-to-the-business)
- [Why does hitchstory not have a command line interface?](https://hitchdev.com/hitchstory/why/no-cli)
- [Principles](https://hitchdev.com/hitchstory/why/principles)
- [Why does HitchStory have no CLI runner - only a pure python API?](https://hitchdev.com/hitchstory/why/pure-python-no-cli)
- [Why Rewritable Test Driven Development (RTDD)?](https://hitchdev.com/hitchstory/why/rewrite)
- [Why does HitchStory use StrictYAML?](https://hitchdev.com/hitchstory/why/strictyaml)


## Why not X instead?

HitchStory is not the only integration testing framework.
This is how it compares with the others:

- [Why use Hitchstory instead of Behave, Lettuce or Cucumber (Gherkin)?](https://hitchdev.com/hitchstory/why-not/gherkin)
- [Why not use the Robot Framework?](https://hitchdev.com/hitchstory/why-not/robot)
- [Why use hitchstory instead of a unit testing framework?](https://hitchdev.com/hitchstory/why-not/unit-test)


## Using HitchStory: Setup on its own

If you want to use HitchStory without pytest:

- [Creating a basic command line test runner](https://hitchdev.com/hitchstory/using/setup/basic-cli)


## Using HitchStory: Behavior

Miscellaneous docs about behavior of the framework:

- [Abort a story with ctrl-C](https://hitchdev.com/hitchstory/using/behavior/aborting)
- [Upgrade breaking changes between v0.14 and v0.15](https://hitchdev.com/hitchstory/using/behavior/breaking-changes-between-v014-and-v015)
- [Handling failing tests](https://hitchdev.com/hitchstory/using/behavior/failing-tests)
- [Running a single named story successfully](https://hitchdev.com/hitchstory/using/behavior/run-single-named-story)


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "hitchstory",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7.0",
    "maintainer_email": "",
    "keywords": "yaml,hitchdev,bdd,tdd,testing,tests",
    "author": "",
    "author_email": "Colm O'Connor <colm.oconnor.github@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/3b/6a/bda7033e595ff3e1d0a44d40403a0d823839a100405fbd41735ff75269ed/hitchstory-0.24.0.tar.gz",
    "platform": null,
    "description": "# HitchStory\n\n[![Main branch status](https://github.com/hitchdev/hitchstory/actions/workflows/regression.yml/badge.svg)](https://github.com/hitchdev/hitchstory/actions/workflows/regression.yml)\n\nType-safe [StrictYAML](https://hitchdev.com/hitchstory/why/strictyaml) python integration testing framework. With this\nframework, your tests can:\n\n## Rewrite themselves from program output (command line test example)\n\n![Test rewriting itself](https://hitchdev-videos.netlify.app/rewrite-demo.gif)\n\n## Autogenerate documentation (website test example)\n\n![Test writing docs](https://hitchdev-videos.netlify.app/rewrite-docs-demo.gif)\n\nThe tests can be run on their own or as pytest tests. \n\n## Demo projects with demo tests\n\nProject | Storytests | Python code | Doc template | Autogenerated docs\n---|---|---|---|---\n[Website](https://github.com/hitchdev/hitchstory/tree/master/examples/website) | [add todo](https://github.com/hitchdev/hitchstory/tree/master/examples/website/hitch/story/add-todo.story), [correct spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/website/hitch/story/correct-my-spelling.story) | [engine.py](https://github.com/hitchdev/hitchstory/tree/master/examples/website/hitch/engine.py) | [docstory.yml](https://github.com/hitchdev/hitchstory/tree/master/examples/website/hitch/docstory.yml) | [Add todo](https://github.com/hitchdev/hitchstory/blob/master/examples/website/hitch/docs/add-and-retrieve-todo.md), [Correct my spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/website/hitch/docs/correct-my-spelling.md)\n[REST API](https://github.com/hitchdev/hitchstory/tree/master/examples/restapi) | [add todo](https://github.com/hitchdev/hitchstory/tree/master/examples/restapi/hitch/story/add-todo.story), [correct spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/restapi/hitch/story/correct-my-spelling.story) | [engine.py](https://github.com/hitchdev/hitchstory/tree/master/examples/restapi/hitch/engine.py) | [docstory.yml](https://github.com/hitchdev/hitchstory/tree/master/examples/restapi/hitch/docstory.yml) | [Add todo](https://github.com/hitchdev/hitchstory/blob/master/examples/restapi/hitch/docs/add-and-retrieve-todo.md), [Correct my spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/restapi/hitch/docs/correct-my-spelling.md)\n[Interactive command line app](https://github.com/hitchdev/hitchstory/tree/master/examples/commandline) | [add todo](https://github.com/hitchdev/hitchstory/tree/master/examples/commandline/story/add-todo.story), [correct spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/commandline/story/correct-my-spelling.story) | [test_integration.py](https://github.com/hitchdev/hitchstory/tree/master/examples/commandline/tests/test_integration.py) | [docstory.yml](https://github.com/hitchdev/hitchstory/tree/master/examples/commandline/tests/docstory.yml) | [Add todo](https://github.com/hitchdev/hitchstory/blob/master/examples/commandline/docs/add-and-retrieve-todo.md), [Correct my spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/commandline/docs/correct-my-spelling.md)\n[A Python API](https://github.com/hitchdev/hitchstory/tree/master/examples/pythonapi) | [add todo](https://github.com/hitchdev/hitchstory/tree/master/examples/pythonapi/story/add-todo.story), [correct spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/pythonapi/story/correct-my-spelling.story) | [test_integration.py](https://github.com/hitchdev/hitchstory/tree/master/examples/pythonapi/tests/test_integration.py) | [docstory.yml](https://github.com/hitchdev/hitchstory/tree/master/examples/pythonapi/tests/docstory.yml) | [Add todo](https://github.com/hitchdev/hitchstory/blob/master/examples/pythonapi/docs/add-and-retrieve-todo.md), [Correct my spelling](https://github.com/hitchdev/hitchstory/tree/master/examples/pythonapi/docs/correct-my-spelling.md)\n\n\n\n\n\n\n# Code Example\n\n\n\nexample.story:\n\n```yaml\nLogged in:\n  given:\n    website: /login  # preconditions\n  steps:\n  - Form filled:\n      username: AzureDiamond\n      password: hunter2\n  - Clicked: login\n\n\nEmail sent:\n  about: |\n    The most basic email with no subject, cc or bcc\n    set.\n  based on: logged in             # inherits from and continues from test above\n  following steps:\n  - Clicked: new email\n  - Form filled:\n      to: Cthon98@aol.com\n      contents: |                # long form text\n        Hey guys,\n\n        I think I got hacked!\n  - Clicked: send email\n  - Email was sent\n```\nengine.py:\n\n```python\nfrom hitchstory import BaseEngine, GivenDefinition, GivenProperty\nfrom hitchstory import Failure, strings_match\nfrom strictyaml import Str\n\nclass Engine(BaseEngine):\n    given_definition = GivenDefinition(\n        website=GivenProperty(Str()),\n    )\n    \n    def __init__(self, rewrite=False):\n        self._rewrite = rewrite\n\n    def set_up(self):\n        print(f\"Load web page at {self.given['website']}\")\n\n    def form_filled(self, **textboxes):\n        for name, contents in sorted(textboxes.items()):\n            print(f\"Put {contents} in name\")\n\n    def clicked(self, name):\n        print(f\"Click on {name}\")\n    \n    def failing_step(self):\n        raise Failure(\"This was not supposed to happen\")\n    \n    def error_message_displayed(self, expected_message):\n        \"\"\"Demonstrates steps that can rewrite themselves.\"\"\"\n        actual_message = \"error message!\"\n        try:\n            strings_match(expected_message, actual_message)\n        except Failure:\n            if self._rewrite:\n                self.current_step.rewrite(\"expected_message\").to(actual_message)\n            else:\n                raise\n\n    def email_was_sent(self):\n        print(\"Check email was sent!\")\n```\n\n\n\n\n\n\n```python\n>>> from hitchstory import StoryCollection\n>>> from pathlib import Path\n>>> from engine import Engine\n>>> \n>>> StoryCollection(Path(\".\").glob(\"*.story\"), Engine()).named(\"Email sent\").play()\nRUNNING Email sent in /path/to/working/example.story ... Load web page at /login\nPut hunter2 in name\nPut AzureDiamond in name\nClick on login\nClick on new email\nPut Hey guys,\n\nI think I got hacked!\n in name\nPut Cthon98@aol.com in name\nClick on send email\nCheck email was sent!\nSUCCESS in 0.1 seconds.\n```\n\n\n\n\n\n\n\n\n## Install\n\n```bash\n$ pip install hitchstory\n```\n\n## Community\n\nHelp is available if you ask questions in these places: [Github discussions](https://github.com/hitchdev/hitchstory/discussions) | [Github issues](https://github.com/hitchdev/hitchstory/issues) (not just for bugs) | [Slack channel](https://join.slack.com/t/hitchstory/shared_invite/zt-1uvrtozlz-vK92y5HN4SETkriUbBIHUQ)\n\n## Using HitchStory\n\nEvery feature of this library is documented and listed below.\nIt is tested and documented with itself.\n\n\n## Using HitchStory: With Pytest\n\nIf you already have pytest set up, you can quickly and easily write\na test using hitchstory that runs alongside your other pytest tests:\n\n- [Self rewriting tests with pytest and hitchstory](https://hitchdev.com/hitchstory/using/pytest/rewrite)\n\n\n## Using HitchStory: Engine\n\nHow to use the different features of the story engine:\n\n- [Hiding stacktraces for expected exceptions](https://hitchdev.com/hitchstory/using/engine/expected-exceptions)\n- [Given preconditions](https://hitchdev.com/hitchstory/using/engine/given)\n- [Gradual typing of story steps](https://hitchdev.com/hitchstory/using/engine/gradual-typing)\n- [Match two JSON snippets](https://hitchdev.com/hitchstory/using/engine/match-json)\n- [Match two strings and show diff on failure](https://hitchdev.com/hitchstory/using/engine/match-two-strings)\n- [Extra story metadata - e.g. adding JIRA ticket numbers to stories](https://hitchdev.com/hitchstory/using/engine/metadata)\n- [Story with parameters](https://hitchdev.com/hitchstory/using/engine/parameterized-stories)\n- [Story that rewrites given preconditions](https://hitchdev.com/hitchstory/using/engine/rewrite-given)\n- [Story that rewrites itself](https://hitchdev.com/hitchstory/using/engine/rewrite-story)\n- [Story that rewrites the sub key of an argument](https://hitchdev.com/hitchstory/using/engine/rewrite-subkey-of-argument)\n- [Raising a Failure exception to conceal the stacktrace](https://hitchdev.com/hitchstory/using/engine/special-failure-exception)\n- [Arguments to steps](https://hitchdev.com/hitchstory/using/engine/steps-and-step-arguments)\n- [Strong typing](https://hitchdev.com/hitchstory/using/engine/strong-typing)\n\n\n## Using HitchStory: Documentation Generation\n\nHow to autogenerate documentation from your tests:\n\n- [Generate documentation with extra variables and functions](https://hitchdev.com/hitchstory/using/documentation/extra)\n- [Generate documentation from story](https://hitchdev.com/hitchstory/using/documentation/generate)\n\n\n## Using HitchStory: Inheritance\n\nInheriting stories from each other:\n\n- [Inherit one story from another simply](https://hitchdev.com/hitchstory/using/inheritance/about)\n- [Story inheritance - given mapping preconditions overridden](https://hitchdev.com/hitchstory/using/inheritance/override-given-mapping)\n- [Story inheritance - override given scalar preconditions](https://hitchdev.com/hitchstory/using/inheritance/override-given-scalar)\n- [Story inheritance - parameters](https://hitchdev.com/hitchstory/using/inheritance/parameters)\n- [Story inheritance - steps](https://hitchdev.com/hitchstory/using/inheritance/steps)\n- [Variations](https://hitchdev.com/hitchstory/using/inheritance/variations)\n\n\n## Using HitchStory: Runner\n\nRunning the stories in different ways:\n\n- [Continue on failure when playing multiple stories](https://hitchdev.com/hitchstory/using/runner/continue-on-failure)\n- [Flaky story detection](https://hitchdev.com/hitchstory/using/runner/flaky-story-detection)\n- [Play multiple stories in sequence](https://hitchdev.com/hitchstory/using/runner/play-multiple-stories-in-sequence)\n- [Run one story in collection](https://hitchdev.com/hitchstory/using/runner/run-just-one-story)\n- [Shortcut lookup for story names](https://hitchdev.com/hitchstory/using/runner/shortcut-lookup)\n\n\n## Approach to using HitchStory\n\nBest practices, how the tool was meant to be used, etc.\n\n- [Is HitchStory a BDD tool? How do I do BDD with hitchstory?](https://hitchdev.com/hitchstory/approach/bdd)\n- [Complementary tools](https://hitchdev.com/hitchstory/approach/complementary-tools)\n- [Domain Appropriate Scenario Language (DASL)](https://hitchdev.com/hitchstory/approach/domain-appropriate-scenario-language-dasl)\n- [Executable specifications](https://hitchdev.com/hitchstory/approach/executable-specifications)\n- [Flaky Tests](https://hitchdev.com/hitchstory/approach/flaky-tests)\n- [The Hermetic End to End Testing Pattern](https://hitchdev.com/hitchstory/approach/hermetic-end-to-end-test)\n- [ANTIPATTERN - Analysts writing stories for the developer](https://hitchdev.com/hitchstory/approach/human-writable)\n- [Snapshot Test Driven Development (STDD)](https://hitchdev.com/hitchstory/approach/snapshot-test-driven-development-stdd)\n- [Test Artefact Environment Isolation](https://hitchdev.com/hitchstory/approach/test-artefact-environment-isolation)\n- [Test concern leakage](https://hitchdev.com/hitchstory/approach/test-concern-leakage)\n- [Tests as an investment](https://hitchdev.com/hitchstory/approach/test-investment)\n- [What is the difference betweeen a test and a story?](https://hitchdev.com/hitchstory/approach/test-or-story)\n- [The importance of test realism](https://hitchdev.com/hitchstory/approach/test-realism)\n- [Testing non-deterministic code](https://hitchdev.com/hitchstory/approach/testing-nondeterministic-code)\n- [Specification Documentation Test Triality](https://hitchdev.com/hitchstory/approach/triality)\n\n\n## Design decisions and principles\n\nDesign decisions are justified here:\n\n- [Declarative User Stories](https://hitchdev.com/hitchstory/why/declarative)\n- [Why does hitchstory mandate the use of given but not when and then?](https://hitchdev.com/hitchstory/why/given-when-then)\n- [Why is inheritance a feature of hitchstory stories?](https://hitchdev.com/hitchstory/why/inheritance)\n- [Why does hitchstory not have an opinion on what counts as interesting to \"the business\"?](https://hitchdev.com/hitchstory/why/interesting-to-the-business)\n- [Why does hitchstory not have a command line interface?](https://hitchdev.com/hitchstory/why/no-cli)\n- [Principles](https://hitchdev.com/hitchstory/why/principles)\n- [Why does HitchStory have no CLI runner - only a pure python API?](https://hitchdev.com/hitchstory/why/pure-python-no-cli)\n- [Why Rewritable Test Driven Development (RTDD)?](https://hitchdev.com/hitchstory/why/rewrite)\n- [Why does HitchStory use StrictYAML?](https://hitchdev.com/hitchstory/why/strictyaml)\n\n\n## Why not X instead?\n\nHitchStory is not the only integration testing framework.\nThis is how it compares with the others:\n\n- [Why use Hitchstory instead of Behave, Lettuce or Cucumber (Gherkin)?](https://hitchdev.com/hitchstory/why-not/gherkin)\n- [Why not use the Robot Framework?](https://hitchdev.com/hitchstory/why-not/robot)\n- [Why use hitchstory instead of a unit testing framework?](https://hitchdev.com/hitchstory/why-not/unit-test)\n\n\n## Using HitchStory: Setup on its own\n\nIf you want to use HitchStory without pytest:\n\n- [Creating a basic command line test runner](https://hitchdev.com/hitchstory/using/setup/basic-cli)\n\n\n## Using HitchStory: Behavior\n\nMiscellaneous docs about behavior of the framework:\n\n- [Abort a story with ctrl-C](https://hitchdev.com/hitchstory/using/behavior/aborting)\n- [Upgrade breaking changes between v0.14 and v0.15](https://hitchdev.com/hitchstory/using/behavior/breaking-changes-between-v014-and-v015)\n- [Handling failing tests](https://hitchdev.com/hitchstory/using/behavior/failing-tests)\n- [Running a single named story successfully](https://hitchdev.com/hitchstory/using/behavior/run-single-named-story)\n\n",
    "bugtrack_url": null,
    "license": "Elastic License 2.0  URL: https://www.elastic.co/licensing/elastic-license  ## Acceptance  By using the software, you agree to all of the terms and conditions below.  ## Copyright License  The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below.  ## Limitations  You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.  You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.  You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor\u2019s trademarks is subject to applicable law.  ## Patents  The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.  ## Notices  You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.  If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.  ## No Other Rights  These terms do not imply any licenses other than those expressly granted in these terms.  ## Termination  If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.  ## No Liability  *As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.*  ## Definitions  The **licensor** is the entity offering these terms, and the **software** is the software the licensor makes available under these terms, including any portion of it.  **you** refers to the individual or entity agreeing to these terms.  **your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.  **your licenses** are all the licenses granted to you for the software under these terms.  **use** means anything you do with the software requiring one of your licenses.  **trademark** means trademarks, service marks, and similar rights.  ",
    "summary": "Type-safe YAML-based example specification driven development framework for python.",
    "version": "0.24.0",
    "project_urls": {
        "changelog": "https://hitchdev.com/hitchstory/changelog",
        "documentation": "https://hitchdev.com/hitchstory/using",
        "homepage": "https://hitchdev.com/hitchstory",
        "repository": "https://github.com/hitchdev/hitchstory"
    },
    "split_keywords": [
        "yaml",
        "hitchdev",
        "bdd",
        "tdd",
        "testing",
        "tests"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "59e069c4dc74b1e7205d61a369723158a004f56ffcb9168467d4fdcd97110563",
                "md5": "ec2e4e2d2d66e5b3fc7ef086b444d2e8",
                "sha256": "6178277c896427b2fb7c44b2c2979e884757e66f6d7e36c59995b3f151d7ba15"
            },
            "downloads": -1,
            "filename": "hitchstory-0.24.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ec2e4e2d2d66e5b3fc7ef086b444d2e8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.0",
            "size": 30299,
            "upload_time": "2024-01-14T10:28:19",
            "upload_time_iso_8601": "2024-01-14T10:28:19.726512Z",
            "url": "https://files.pythonhosted.org/packages/59/e0/69c4dc74b1e7205d61a369723158a004f56ffcb9168467d4fdcd97110563/hitchstory-0.24.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b6abda7033e595ff3e1d0a44d40403a0d823839a100405fbd41735ff75269ed",
                "md5": "3f5116d07e51b35f9496f6aa59623f63",
                "sha256": "c3f1317c0674ba05eda8d07f454d00d3b580162fb52ceae99553058d586b34da"
            },
            "downloads": -1,
            "filename": "hitchstory-0.24.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3f5116d07e51b35f9496f6aa59623f63",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.0",
            "size": 33013,
            "upload_time": "2024-01-14T10:28:23",
            "upload_time_iso_8601": "2024-01-14T10:28:23.676138Z",
            "url": "https://files.pythonhosted.org/packages/3b/6a/bda7033e595ff3e1d0a44d40403a0d823839a100405fbd41735ff75269ed/hitchstory-0.24.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-14 10:28:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hitchdev",
    "github_project": "hitchstory",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "hitchstory"
}
        
Elapsed time: 0.20863s