63 Star 183 Fork 3

Gitee 极速下载/hyperledger-fabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.github
bccsp
bddtests
common
features
msp
orderer
peer
regression
scripts
steps
templates/html
.behaverc
README.md
bddtests_test.go
chaincode.go
compose.go
conn.go
context.go
context_bootstrap.go
context_endorser.go
dc-base.yml
dc-orderer-base.yml
dc-orderer-kafka-base.yml
dc-orderer-kafka.yml
dc-peer-base.yml
dc-peer-couchdb.yml
docker.go
environment.py
tlsca.cert
tlsca.priv
users.go
util.go
common
core
devenv
docs
events
examples
gossip
gotools
images
msp
orderer
peer
proposals/r1
protos
release/templates
release_notes
sampleconfig
scripts
test
unit-test
vendor
.baseimage-release
.dockerignore
.gitattributes
.gitignore
.gitreview
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
LICENSE
Makefile
README.md
ci.properties
docker-env.mk
mkdocs.yml
settings.gradle
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/hyperledger/fabric
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Welcome to the Behavioral Driven Development (BDD) subsytem for Fabric

Developers will find these mechanisms useful for both exploratory and verification purposes.

Getting started

Installation

Setup python virtual environment wrapper usage

    sudo pip install virtualenv
    sudo pip install virtualenvwrapper
    export WORKON_HOME=~/Envs
    source /usr/local/bin/virtualenvwrapper.sh

Setup your virtual environment for behave

Virtual Environment Guide

    mkvirtualenv -p /usr/bin/python2.7 behave_venv

This will automaticall switch you to the new environment if successful. In the future, you can switch to the virtual environment using the workon command as shown below.

    workon behave_venv

Now install required modules into the virtual environment

NOTE: If you have issues installing the modules below, and you are running the vagrant environment, consider performing a vagrant destroy followed by a vagrant up.

    pip install behave
    pip install grpcio-tools
    pip install "pysha3==1.0b1"
    pip install b3j0f.aop
    pip install jinja2
    # The pyopenssl install gives errors, but installs succeeds
    pip install pyopenssl
    pip install ecdsa
    pip install python-slugify
    pip install pyyaml

Running behave

Peer Executable and Docker containers

Behave requires the peer executable for packaging deployments. To make the peer execute the following command.

#Change to the root fabric folder to perform the following commands.
cd ..

# Optionally perform the following clean if you are unsure of your environments state.
make clean
make peer

The peer executable will be located in the build/bin folder. Make sure that your PATH enviroment variable contains the location. Execute the following command if necessary.

    export PATH=$PATH:$GOPATH/src/github.com/hyperledger/fabric/build/bin

The behave system also uses several docker containers. Execute the following commands to create the required docker containers.

    make peer-docker
    make orderer-docker

Change back to the bddtests folder (Where this readme is located) to execute subsequent behave commands.

    cd bddtests

Running all of the behave features and suppressing skipped steps (-k)

The following behave commands should be executed from within this folder.

    behave -k -D cache-deployment-spec

Running a specific feature

    behave -k -D cache-deployment-spec features/bootstrap.feature

Deactivating your behave virtual environment

Once you are done using behave and you wish to switch back to your normal python environment, issue the following command.

    deactivate

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License. s

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/mirrors/hyperledger-fabric.git
git@gitee.com:mirrors/hyperledger-fabric.git
mirrors
hyperledger-fabric
hyperledger-fabric
v1.0.5

搜索帮助