bkrdoc
======
This project aims to provide tools for automated documentation generation for BeakerLib tests.
## 1. Introduction
### 1.1 What is bkrdoc?
**bkrdoc** is a documentation generator from tests written using **BeakerLib** library. This generator makes documentation from test code with and also without any documentation markup.
### 1.2 What it`s good for?
For fast, brief and reliable documentation creation. It`s good for quick start with unknown **BeakerLib** test. Created documentations provides information about the documentation credibility. Also created documentations shows environmental variables and helps reader to run test script from which was documentation created.
**bkrdoc** is written in pure python.
### 1.3 What is BeakerLib?
**BeakerLib** is a shell-level integration testing library, providing convenience functions which simplify writing, running and analysis of integration and blackbox tests.
https://fedorahosted.org/beakerlib/
### 1.4 How is bkrdoc licensed?
BSD license. See the LICENSE file in the distribution.
### 1.5 Contact details
Feel free to send me an email ([email protected]) for any question you have on **bkrdoc** project.
## 2. Installing
### 2.1 Prerequisites
- **bkrdoc** was tested on Python 2.7 and 3.3 versions on Linux.
- **bkrdoc** has no external dependencies.
### 2.2 Installation process
Instalation is very simple. You have two choices. First is to download rpm from [bkrdoc](https://pypi.python.org/pypi/bkrdoc) pypi and easily install it. Second choice is to download whole project and after that run setup.py script in bkrdoc folder. For executing setup.py file you need to run this standart `python setup.py install` command.
## 3. Using
### 3.1 Basic usage
Documentation generator for analysis is `documentation_generator.py` file and for markup is `tagged_generator.py`. For generation of documentation there is file called `bkrdoc/beakerlib_doc.py`. Shown on this example:
```
for analysis:
python beakerlib_doc.py analysis [analysis-options] [BeakerLib_test.sh]
for markup:
python beakerlib_doc.py markup [markup-options] [BeakerLib_test.sh]
```
### 3.2 Documentation tags
First important thing is that all documentation comments **must** start with `#@`. For example this code comment `#@ Makes temporary directory and saves work in it` will create this documentation line: `Makes temporary directory and saves work in it`.
If a documentation comment is before BeakerLib phase, function, loop or condition this comment will be taken as a description. You can see what will happen on this example:
```bash
#@ Various types of arguments will start this part
rlPhaseStartTest "various argument types"
#@ for every argument in selected word will do...
for arg in disabled EnAbLeD dIsAblEd enabled no Yes nO yes 0 1
do
#@ Report argument
rlRun "abrt-auto-reporting $arg"
done
#@ Reporting finished
rlPhaseEnd
```
result:
```
Test "various argument types"
Various types of arguments will start this part
loop: for every argument in selected word will do...
Report argument
Reporting finished
```
In the top of every generated documentation are three lines consits of description, information about authors and keyword of the test. These three lines are generated from test template. But it can occur that the template is missing or you want to add more data and that you can do using these tags: `@keyword`, `@key`, `@author` and `@description`. For example: `#@ @key httpd` will add key into keywords line:
```
Description: Simple test
Author: Jan Kresla
Keywords: httpd
```
Also tagged generator supports block comments. Block comments must start with `#@` but following documentation comments can start with simple `#` as you can see on this example:
```bash
#@ Somenthing in start of the test
# Could be anything
# Make temporary directory and saves work in it
rlPhaseStartSetup
TmpDir=$(mktemp -d)
pushd $TmpDir
rlPhaseEnd
```
will generate:
```
Setup
Somenthing in start of the test
Could be anything
Make temporary directory and saves work in it
```
## 4. Package contents
After downloading bkrdoc project, you will see following files and directories:
_**README.md:**_
This README file.
_**LICENSE:**_
File with bkrdoc license.
_**bkrdoc/:**_
Folder with bkrdoc generator which is creating documentations from **BeakerLib** tests with and without any documentation markup.
_**bkrdoc/analysis/:**_
Folder with sources for automated documentation generator without documentation markup
_**bkrdoc/markup/:**_
Folder with sources for automated documentation generator with documentation markup
_**examples/:**_
This folder contains some **BeakerLib** tests and generated documentations
_**docs/:**_
Folder contains TODO options and first documentation format.
_**tests/:**_
Folder contains files for bkrdoc testing
## 5. CI Status
**bkrdoc** is automatically tested by [Travis CI project](https://travis-ci.org). Latest build status is:
[![Build Status](https://travis-ci.org/rh-lab-q/bkrdoc.svg?branch=master)](https://travis-ci.org/rh-lab-q/bkrdoc)
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
bkrdoc-1.2.5.tar.gz (54个子文件)
bkrdoc-1.2.5
PKG-INFO 711B
docs
LICENSE 34KB
markup
doc_format.txt 433B
analysis
TODO_list.txt 850B
beakerlib_doc.py 2KB
bkrdoc
__init__.py 55B
markup
tagged_generator_tests.py 15KB
__init__.py 89B
data_containers.py 24KB
tagged_parser.py 11KB
tagged_generator.py 5KB
analysis
option_object.py 696B
conditions_for_commands.py 5KB
test_functions.py 585B
information_units.py 45KB
doc_information_representation.py 1KB
documentation_translator.py 30KB
documentation_generator.py 11KB
credibility.py 2KB
bkrdoc_parser.py 5KB
topic_object.py 559B
get_information.py 15KB
__init__.py 494B
data_containers.py 10KB
test_variables.py 2KB
Statement_data_searcher.py 28KB
setup.cfg 89B
examples
pxe-boot-generated-DOC.txt 196B
mozila-generated-DOX.txt 2KB
tests
apache-test.sh 4KB
autopart-test.sh 2KB
abrt-auto-reporting-sanity-test.sh 5KB
pxe-boot-test.sh 2KB
ClamAV-test.sh 910B
mozila-test.sh 7KB
apache-generated-DOC.txt 1KB
manualy_written_documentations
pxe-boot-test-ideal-DOC.txt 341B
mozila-test-ideal-DOC.txt 717B
apache-test-ideal-DOC.txt 622B
markup
loop_test.sh 2KB
abrt-auto-reporting-sanity-test-DOC.txt 2KB
abrt-auto-reporting-sanity-test.sh 5KB
testFromBugzila.sh 2KB
condition-PURPOSE.txt 2KB
testFromBugzila-DOC.txt 696B
condition_test.sh 2KB
loop-PURPOSE.txt 1009B
apache-modified.sh 5KB
abrt-auto-reporting-sanity-test-DOC-1.txt 6KB
containers_tests.sh 1KB
abrt-PURPOSE.txt 2KB
containers-PURPOSE.txt 1KB
setup.py 898B
README.md 5KB
共 54 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功