Chapter 6. Testing and Maintenance

Welcome to the final chapter in Part III. The life cycle for smart contracts is the same as for other software. Once the software is developed, tested, and deployed, our attention transitions to maintenance.

Many activities are performed to test and maintain software throughout its life cycle. These activities are grouped into two broad categories: technical and nontechnical. Our concern is with the technical activities that modify the software. Under maintenance, the modifications are generally either fixing something or adding something new. When bugs are discovered, they need to be corrected, so a maintenance task is created to fix the bug. When new features or capabilities are demanded, a maintenance task is created to add one or more new features to the software. Sometimes significant modifications can result in a release of a new version of software. This applies also to the clients of smart contracts. These activities continue until the software is retired. The majority of the software life cycle is consumed by maintenance. When fixing bugs or adding new features, testing is critical to success.

Throughout the entire life cycle, including both development and maintenance, the activity of testing is relied upon to ensure that the software is working as expected and meets the functional and nonfunctional requirements. Testing can be executed in many ways, and several schools of thought exist on how to approach and implement testing. Whichever ...

Get Hands-On Smart Contract Development with Hyperledger Fabric V2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.