I am a 🇵🇹 PhD researcher @ Técnico Lisboa, where I teach User Centered Design. I am being a mentor at the Hyperledger Fabric Based Access Control project, supported and funded by Hyperledger and the Linux Foundation 🔥. 🚀 💪 Please make sure to check my blockchain projects on my Github sponsors page ⛓️ Testing blockchain applications can be cumbersome, mainly because they are complex, resource-demanding distributed systems. Testing your blockchain app on the cloud might improve the efficiency of the testing process, as well as achieving more realistic test environments. 302665) applies , , , and more to come) This article provides a 101 guide on how to use Hyperledger Caliper (commit on Google Cloud , tackling the scenario of testing a Hyperledger Composer application, a blockchain framework which facilitates the development of Hyperledger Fabric applications. Nonetheless, this testing process to all blockchains supported by Hyperledger Caliper ( Hyperledger Burrow Hyperledger Fabric Hyperledger Iroha Hyperledger Sawtooth . Setting Up The Testing Environment Create a private repository (e.g., on Github).Fork the Hyperledger Caliper project to your private repo: 1. Create a private repository (e.g., on Github). 2.Fork the Hyperledger Caliper project to your private repo: git clone --bare https: cd caliper.git git push --mirror https: cd .. rm -rf caliper.git //github.com/hyperledger/caliper.git //github.com/USERNAME/CALIPER-PRIVATE-REPO.git 3. Clone your private repo: git clone https: //github.com/USERNAME/CALIPER-PRIVATE-REPO.git 4. On , create a folder with the name of your application, e.g. . CALIPER-PRIVATE-REPO/packages/caliper-samples/benchmark/composer my-network 5. On the folder, paste the contents of the . On a future article, I will explain how to write tests ( ) and benchmark configurations ( ). my-network configuration and test files from this repository my-network.js config.yaml 6. You should have a developed business network using Composer (the BNA archive). If you have not developed a business network, you can still configure Caliper to test default business networks. On , create a folder named . Paste your business network archive files ( BNA file) inside the folder. You should have a lib folder, a models folder, and the files package.json, permission.acl and optionally, a README.md. CALIPER-PRIVATE-REPO-justicechain/packages/caliper-samples/src/contract/composer my-network decompressed jsonNote that on package.json, the name and version of the network have to coincide with the one on composer.json. Example package.json: { :{ : }, : , : , ... ETC "engines" "composer" "^0.20.0" "name" "my-network" "version" "0.2.6-deploy.1" 7. You have the necessary files to test your app. Push them to your repository: git add * git commit -m git push origin master "add benchmark files" Setting Up Google Cloud 1. Create an account on Google Cloud. New accounts can apply for a free trial grant. Create a project, and activate the Compute Instance API. 2. At Compute Engine -> VM Instances, click on . Create a new instance 3. Start your instance. 4. Click on Connect — SSH. 5. Install the prerequisites for Hyperledger Caliper (thanks ): Daz Wilkin sudo apt-get update sudo apt-get install \ linux-image-extra-$(uname -r) \ linux-image-extra-virtual sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common curl -fsSL https: sudo add-apt-repository \ sudo apt-get update sudo apt-get install docker-ce sudo usermod -aG docker $USER sudo systemctl enable docker docker --version //download.docker.com/linux/ubuntu/gpg | sudo apt-key add - "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo curl -L https: sudo chmod +x /usr/local/bin/docker-compose Golang (optional) VERSION= OS=linux ARCH=amd64 sudo curl \ --location https: --output go$VERSION.$OS-$ARCH.tar.gz sudo tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz PATH=$PATH: local/go/bin go version //github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose 1.9 .1 //golang.org/dl/go$VERSION.$OS-$ARCH.tar.gz \ export /usr/ 6. Clone your private repository with Caliper and your blockchain app to your Google Compute instance. Testing your Application To run your benchmark, navigate to caliper/packages/caliper-samples. To benchmark your application with run: caliper benchmark run -w ./ -c benchmark/composer/justice/config.yaml -n benchmark/composer/justice/composer.json CouchDB To benchmark your application with run: caliper benchmark run -w ./ -c benchmark/composer/justice/config.yaml -n benchmark/composer/justice/composer-level.json LevelDB The results of the benchmark will be reported on the terminal. Do not forget to stop your machines in Google Cloud after finishing the experiments or else 💸. Next Steps Thanks very much for reading. You Rock 💪. 🚀 🙏 If you like blockchain and open source, be sure to support my work on Github sponsors page