hyperledger-fabrichyperledgerhyperledger-composerhyperledger-caliper

Hyperledger Caliper tutorial for Composer network


I want to execute a performance evaluation test on a deployed Hyperledger Composer business network using Hyperledger Caliper.

Into the official documentation there is a section for the Composer configuration but I think that it's not very user friendly for those approaching this framework for the first time and I cannot find a better basic step-by-step tutorial for configuring and running an evaluation test.


Solution

  • Check that all the prerequisites are installed:

    Build Caliper:

    Do not run any of the above commands with sudo, as it will cause the bootstrap process to fail

    Install the Caliper CLI

    Execute the following command from the packages/caliper-tests-integration directory:

    npm run e2e_install
    

    Run a Sample Benchmark

    from caliper/packages/caliper-samples/ run

    caliper benchmark run -c benchmark/composer/config.yaml -n network/fabric-v1.3/2org1peercouchdb/composer.json -w ../caliper-samples/
    

    where the parameters means:

    -w : path to a workspace directory (required)
    -c : relative path from the workspace to the benchmark configuration file (required).
    -n : relative path from the workspace to the config file of the blockchain network under test (required).
    

    To create tests for your Business Network you need to modify the config.yaml and composer.json files. You also have to create a .js file where you need to implement the test to be runned, and specify the path to this file in the callback section of config.yaml file.

    For more informations check https://hyperledger.github.io/caliper/docs/1_Getting_Started.html