Giter VIP home page Giter VIP logo

fabric-test's Introduction

Welcome to fabric-test


Build Status

You are in the right place if you are interested in testing the Hyperledger Fabric and related repositories.

Getting Started

Here are some recommended setup steps. The following repositories will need to be cloned separately with their corresponding images built.

  • fabric:
    • fabric-orderer
    • fabric-peer
    • fabric-kafka
    • fabric-zookeeper
    • fabric-tools
    • fabric-couchdb
    • fabric-testenv
    • fabric-ccenv
  • fabric-ca
  • fabric-test

Setup the Submodules

Once the fabric, fabric-ca and fabric-test repositories are in place, in $GOPATH/src/github.com/hyperledger/, initialize and populate the submodules. Execute the following:

  cd $GOPATH/src/github.com/hyperledger/fabric-test
  git submodule update --init --recursive

Update git submodules (Optional)

The fabric-test repository contains submodules of other Hyperledger Fabric projects that are used in testing. Tests may be run with the submodule commit levels saved with the commit-level of fabric-test. Or, the git submodules may be updated to run tests with the bleeding edge of development master branches. If you would like to update the git submodules, use the following command:

  git submodule foreach git pull origin master

Note: When making changes for committing to a submodule (for example, fabric code), then make the change in the actual repository and not here in the submodules. This makes managing changes much easier when working with submodules.

Build the images, binaries and gotools

Ensure you are in your $GOPATH/src/github.com/hyperledger/fabric-test directory. These steps will help prepare the environment.

To install dependencies - NodeJS,NPM (one time only):

  make pre-setup

To build all images and binaries in fabric, fabric-ca, as required by tests (execute each time you update the repositories commit levels, after each make git-update)

  cd $GOPATH/src/github.com/hyperledger/fabric-test/fabric

  make docker     #  Builds all fabric images.
  make native     #  Builds all binaries.


  cd $GOPATH/src/github.com/hyperledger/fabric-test/fabric-ca

  make docker     # Builds all fabric-ca images.

To install all the gotools, required for testing, execute the following command

  cd $GOPATH/src/github.com/hyperledger/fabric-test

  make gotools     # Downloads the gotools like ginkgo, golint, goimports, gocov and govendor

To update the go version in the repo, follow the below steps

  Step 1: Change GO_VER in the azure-pipeline yml files in fabric-test/ci directory.

  Step 2: Find all files in repo called go.mod. 'cd' into each of those directories. Remove go.mod and go.sum files and execute the following steps
          1. go mod init
          2. go get -u github.com/hyperledger/fabric-test@master
          3. go mod tidy

  Step 3: Commit all the go.mod and go.sum files that get changed in those directories

Then, choose a tool and a test to run by following the instructions.

Easy Method to build all images and run tests with a single make target

You can run the automated test suites with a makefile target given below. This handles all the steps for you as the procedure installs all the prerequisites that include cloning fabric, fabric-ca repositories, building images and binaries and executing the daily tests or smoke tests in the fabric-test repository. Simply run one of the following commands,


  make regression/smoke     # Cleans environment, updates submodules, clones & builds
                            # fabric & fabric-ca images, executes Smoke tests from
                            # regression/smoke folder.

Tools Used to Execute Tests

Operator

Please see the README located in the tools/operator directory for more detailed information for using the Operator to launch Fabric networks, administer them, and execute actions from test-input files to reconfigure the network, disrupt the network, or use PTE to send transactions.

NetworkLauncher - dynamically build a Fabric network

Please see the README located in the tools/NL directory for more detailed information for using the command line to run the Networker Launcher to dynamically create a Fabric network on a single host machine.

Performance Traffic Engine

Please see the README located in the tools/PTE directory for more detailed information for using the Performance Traffic Engine to drive transactions through a Fabric network.

Continuous Integration

Many tests are now integrated into CI. Every patch set triggers a fabric-test-verify job and executes smoke tests. Once the build is successfully executed, the CI job sends All checks have passed vote back to the corresponding github pull request; otherwise it sends an error message. Please see the fabric-test CI job page:

Note: Migrating from Jenkins to Azure CI.

.. Licensed under Creative Commons Attribution 4.0 International License https://creativecommons.org/licenses/by/4.0/

fabric-test's People

Contributors

scottz64 avatar lhaskins avatar bharadwajambati95 avatar suryalnvs avatar adnan-c avatar rameshthoomu avatar sambhavdutt avatar sykesm avatar 2016nishi avatar vijaypunugubati avatar asararatnakar avatar ryjones avatar awjh-ibm avatar vramakrishna avatar yuki-kon avatar johndsheehan avatar rennman avatar shimos avatar chandrachavva avatar mastersingh24 avatar shw8927 avatar ricjhill avatar nklincoln avatar luomin avatar gennadylaventman avatar denyeart avatar christo4ferris avatar nileshdeotale avatar vmorris avatar wenjianqiao avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.