Chaincode for Go developers, Part 2, Unit-testing your Blockchain chaincode in Go for Hyperledger Fabric v0.6

How to use shim MockStub to unit-test your chaincode without having to deploy it in a Blockchain network

From the developerWorks archives

Varun Ojha

Date archived: February 5, 2018 | First published: April 03, 2017

In this tutorial, learn the concepts of test-driven development and see how to apply this approach to writing chaincode in Golang for Hyperledger Fabric v0.6. See how you can easily unit-test your chaincode without the cumbersome step of first deploying the chaincode in a blockchain network. Abundant sample code demonstrates a home loan and purchase contract process on a blockchain network.

This content is no longer being updated or maintained. The full article is provided "as is" in a PDF file. Given the rapid evolution of technology, some content, steps, or illustrations may have changed.



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Blockchain, Cloud computing
ArticleID=1044523
ArticleTitle=Chaincode for Go developers, Part 2: Unit-testing your Blockchain chaincode in Go for Hyperledger Fabric v0.6
publish-date=04032017