Metadata-Version: 2.0
Name: livingdocs
Version: 0.1.2
Summary: Create living documentation from BDD specs
Home-page: https://github.com/accraze/python-livingdocs
Author: Andy Craze
Author-email: accraze@gmail.com
License: BSD
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Utilities
Requires-Dist: awesome-slugify
Requires-Dist: click

========
Overview
========



Using a Python BDD test runner like `behave <http://pythonhosted.org/behave/>`_, create living documentation from your BDD feature files. This library will create documents that contain up-to-date information about your BDD specs.


Current supported document types:

* `*.mmark` files (to be used by `Hugo <https://gohugo.io/>`_)


Installation
============

::

    pip install livingdocs

Quick Start
============

Using a test runner like `behave <http://pythonhosted.org/behave/>`_, you can generate documents for each feature, scenario and step. In **environment.py**, you can use the  DocsMaker to capture this information:


::

    from livingdocs.maker import DocsMaker

    def before_all(context):
        context.docs = DocsMaker('feature')

    def before_scenario(context, scenario):
        context.docs.start_scenario(context, scenario)

    def after_scenario(context, scenario):
        context.docs.end_scenario(context, scenario)

    def before_feature(context, feature):
        context.docs.start_feature(context, feature)

    def after_feature(context, feature):
        context.docs.end_feature(context, feature)

    def before_step(context, step):
        context.docs.start_step(context, step)

    def after_step(context, step):
        """
        if context.browser is an instance
        of Selenium Webdriver, then it will
        take a snapshot of this step.
        """
        context.docs.end_step(context, step)


Development
===========

First create a virtual env, then to run the tests use::

    tox -e py27


License
========

* BSD license



Changelog
=========

0.1.0 (2016-08-21)
-----------------------------------------

* First release on PyPI.


