Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Oracle Blockchain Quick Start Guide

You're reading from  Oracle Blockchain Quick Start Guide

Product type Book
Published in Sep 2019
Publisher Packt
ISBN-13 9781789804164
Pages 350 pages
Edition 1st Edition
Languages
Concepts
Authors (3):
Vivek Acharya Vivek Acharya
Profile icon Vivek Acharya
Anand Eswararao Yerrapati Anand Eswararao Yerrapati
Profile icon Anand Eswararao Yerrapati
Nimesh Prakash Nimesh Prakash
Profile icon Nimesh Prakash
View More author details
Toc

Table of Contents (8) Chapters close

Preface 1. Exploring Blockchain and BaaS 2. Construing Distributed Ledger Tech and Blockchain 3. Delving into Hyperledger Fabric 4. Engage in Business Case on Blockchain Platform 5. Managing Solutions on Oracle Blockchain Platform 6. Developing Solutions on Oracle Blockchain Platform 7. Other Books You May Enjoy

Testing chaincode

A chaincode can be tested locally, without installing it on OBP. There are two ways to test chaincode: using mock shim and using REST endpoints.

Testing chaincode using the shim

Let's see how to test the earlier chaincode developed locally in the Go language. Before that, here are some key points to note:

  • Install the Go language locally on your machine.
  • This test filename should take this form: <Go file name>_test.go.

For example: if the chaincode name is education.go, then this test filename should be education_test.go.

  • Keep both files in the same folder.
  • Set GOPATH to the folder.
  • Install the dependent packages used in the chaincode if they can't be found.

For example: go get github...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime