You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 22, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.rst
+40-20
Original file line number
Diff line number
Diff line change
@@ -41,68 +41,88 @@ Overview
41
41
42
42
.. end-badges
43
43
44
-
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.
45
-
44
+
Using a Python BDD test runner like `behave`_, create living
45
+
documentation from your BDD feature files. This library will create
46
+
documents that contain up-to-date information about your BDD specs and
47
+
helps generate a static site for your living documentation.
46
48
47
49
Current supported document types:
48
50
49
-
* `*.mmark` files (to be used by `Hugo <https://gohugo.io/>`_)
50
-
51
+
- \*.mmark files (to be used by `Hugo`_)
51
52
52
53
Installation
53
-
============
54
+
------------
54
55
55
56
::
56
57
57
58
pip install livingdocs
58
59
60
+
You should also install the Hugo binaries in order to generate your
Use the CLI command ``livingdocs`` to configure your Hugo site:
67
+
68
+
::
69
+
70
+
$ livingdocs
71
+
Your site's title: <enter title>
72
+
Your site's description: <enter description>
73
+
....
61
74
62
-
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:
75
+
This will create a ``livingdocs`` folder in your root directory which
76
+
will have a Hugo skeleton to create a static site.
63
77
78
+
Using a test runner like `behave`_, you can generate documents for each
79
+
feature, scenario and step. In **environment.py**, you can use the
80
+
DocsMaker to capture this information:
64
81
65
82
::
66
83
67
84
from livingdocs.maker import DocsMaker
68
-
85
+
69
86
def before_all(context):
70
87
context.docs = DocsMaker('feature')
71
-
88
+
72
89
def before_scenario(context, scenario):
73
90
context.docs.start_scenario(context, scenario)
74
-
91
+
75
92
def after_scenario(context, scenario):
76
93
context.docs.end_scenario(context, scenario)
77
-
94
+
78
95
def before_feature(context, feature):
79
96
context.docs.start_feature(context, feature)
80
-
97
+
81
98
def after_feature(context, feature):
82
99
context.docs.end_feature(context, feature)
83
-
100
+
84
101
def before_step(context, step):
85
102
context.docs.start_step(context, step)
86
-
103
+
87
104
def after_step(context, step):
88
105
"""
89
106
if context.browser is an instance
90
107
of Selenium Webdriver, then it will
91
108
take a snapshot of this step.
92
109
"""
93
110
context.docs.end_step(context, step)
94
-
111
+
95
112
96
113
Development
97
-
===========
114
+
-----------
98
115
99
-
First create a virtual env, then to run the tests use::
116
+
First create a virtual env, then to run the tests use:
0 commit comments