DevOps.com

Where the world meets DevOps

  • Latest
    • This Week in DevOps
    • Articles
    • Features
    • Most Read
    • News
    • News Releases
  • Topics
    • AI
    • Continuous Delivery
    • Continuous Testing
    • Cloud
    • Culture
    • DevSecOps
    • Enterprise DevOps
    • Leadership Suite
    • DevOps Practice
    • ROELBOB
    • DevOps Toolbox
  • Chat
  • Webinars
    • Upcoming
    • On-Demand Webinars
  • Library
  • Events
    • Virtual Summits
    • Conferences
  • Sponsored Communities
    • CloudBees
  • Related Sites
    • MediaOps
    • Container Journal
    • Security Boulevard
    • SweetCode.io
    • Digital Anarchist
    • DevOps TV on YouTube
    • DevOps Chat on SoundCloud
    • DevOps Connect
    • DevOps Dozen
  • Follow Us
    • Twitter
    • Google News
    • LinkedIn
    • Facebook
    • DevOps TV on YouTube
    • Email
MENUMENU
  • AI
    • Computer Vision is Building the Future

      Computer Vision is Building the Future

      OverOps

      OverOps Integrates AI Code Analyzer With CI/CD Platforms

      Fujitsu State of Digital Transformation

      Fujitsu: State of Digital Transformation Is…Mixed

      With Platform, Dotscience Applies DevOps to AI

      With Platform, Dotscience Applies DevOps to AI

      BMC AIOps

      DevOps Deeper Dive: BMC Software Bets on AIOps Transformation

  • Cloud
    • Virtual Instruments

      Virtual Instruments Acquires Metricly to Monitor Cloud Costs

      CloudBees cloud bursting

      CloudBees Harnesses Additional Cloud Bursting

      FaaS is Key to DevOps Efficiency

      FaaS is Key to DevOps Efficiency

      VMwareHCX

      VMware Looks to Accelerate App Migration to the Cloud

      Ways IoT Developers Make Applications Secure

      3 Ways IoT Developers Can Make Their Applications More Secure

  • Continuous Delivery
    • CloudBees continuous delivery

      CloudBees Advances Continuous Delivery

      OverOps

      OverOps Integrates AI Code Analyzer With CI/CD Platforms

      CircleCI Extends CI/CD Reach to Windows Platforms

      CircleCI Extends CI/CD Reach to Windows Platforms

      Armory Looks to Drive Enterprise Adoption of Spinnaker

      Armory Looks to Drive Enterprise Adoption of Spinnaker

      Armory DevOps Chat

      DevOps Chat: Armory Discusses $28M Funding, Continuous Delivery

  • Continuous Testing
    • How Continuous Testing Advances Your Business Goals

      How Continuous Testing Advances Your Business Goals

      CloudBees' Acquisition of Rollout: The CEOs' View

      CloudBees’ Acquisition of Rollout: The CEOs’ View

      The Human Value in Automation-Driven DevOps Testing

      The Human Value in Automation-Driven DevOps Testing

      How to Create Bug-Free Blockchain Apps

      How to Create Bug-Free Blockchain Apps

      How AI is Transforming Testing Today

      How AI is Transforming Testing Today

  • DevSecOps
    • CircleCI Adds Security Orbs to CI/CD Platform

      CircleCI Adds Security Orbs to CI/CD Platform

      Modernizing Security Like Visiting Fast-Food Restaurant

      Why Modernizing Security is Like Visiting a Fast-Food Restaurant

      Helping Developers Win in the Shift-Left Revolution

      Helping Developers Win in the Shift-Left Revolution

      Top 5 AWS Security Mistakes: Leaky S3 Buckets

      Top 5 AWS Security Mistakes: Leaky S3 Buckets

      Software Compliance Teams Learn DevSecOps

      Software Compliance Teams Can Learn a Lot from DevSecOps

  • Leadership Suite
    • Insights from the World’s Leading IT Organizations

      Three Insights from the World’s Leading IT Organizations

      DevOps Implementation is Often Unsuccessful

      Why DevOps Implementation is Often Unsuccessful – and How to Fix It

      How to Transition to Become a DevOps Engineer

      How to Transition to Become a DevOps Engineer

      Leadership Drives Digital Transformation Success

      Leadership Drives Digital Transformation Success

      Product Managers Can Take Back Control with Feature Flags

      How Product Managers Can Take Back Control with Feature Flags

  • Practices
    • Insights from the World’s Leading IT Organizations

      Three Insights from the World’s Leading IT Organizations

      DevOps on Database Monitoring and Management

      The Impact of DevOps on Database Monitoring and Management

      DevOps Implementation is Often Unsuccessful

      Why DevOps Implementation is Often Unsuccessful – and How to Fix It

      How to Transition to Become a DevOps Engineer

      How to Transition to Become a DevOps Engineer

      Computer Vision is Building the Future

      Computer Vision is Building the Future

  • ROELBOB
    • agile-anti-patterns-23

      Agile Anti-Pattern #23

      Length-of-Employment

      Length of Employment

      defensive-coding

      Defensive Coding

      Maintenance Development

      Maintenance Development

      message-patterns

      Message Patterns

  • Toolbox
    • Computer Vision is Building the Future

      Computer Vision is Building the Future

      Progressive Web Apps are Taking Over the Mobile Web

      Progressive Web Apps are Taking Over the Mobile Web

      OverOps

      OverOps Integrates AI Code Analyzer With CI/CD Platforms

      GitHub Actions

      GitHub Actions Advances Automation Strategy

      CollabNet VersionOne Advances End-to-End DevOps Strategy

      CollabNet VersionOne Advances End-to-End DevOps Strategy

  • More Topics
    • Application Performance Management/Monitoring
    • Culture
    • Enterprise DevOps

Home » Blogs » Continuous Testing » How to Create Bug-Free Blockchain Apps

How to Create Bug-Free Blockchain Apps

How to Create Bug-Free Blockchain Apps

Thong NguyenBy Thong Nguyen on May 31, 2019 5 Comments

While all developers strive for bug-free code, it’s particularly crucial in a blockchain deployment where sensitive data or other confidential info is being exchanged, such as in health care or finance. However, some businesses have learned that lesson the hard way. Cryptocurrency exchange Binance recently revealed a devastating security breach that resulted in a loss of more than $40 million. While this is a large sum, a security breach could be even more costly for businesses that lose private messages, confidential contracts and more.

Related Posts
  • Integrating Blockchain and DevOps
  • Blockchains Done Right Are the Next Evolution in Open Source
  • DevOps in the Age of Blockchain
    Related Categories
  • Application Performance Management/Monitoring
  • Blogs
  • Continuous Testing
  • DevOps Practice
    Related Topics
  • back end
  • blockchain apps
  • blockchain testing
  • bug-free code
  • continuous testing
  • front end
  • security testing
  • test automation
Show more
Show less

Rebuilding (and regaining customer trust) is not where organizations should be spending their time. A better way forward is for company leadership to mandate a blockchain test automation strategy from the very beginning.

While most software testers are familiar with testing web applications, they may not be sure how to approach blockchain testing. The good news is, some of the same focus areas of web testing apply to blockchain testing, too (functional, performance and security). However, blockchain involves a greater number of tests, effort and focus areas, such as infrastructure orchestration, staging and simulating scenarios in a distributed environment, which requires an even greater level of expertise.

Because of these additions, fixing a bug in a blockchain app requires several extra steps and, as a result, it is more time-consuming and costly than fixing bugs in other apps. For example, to reproduce bugs or verify code, developers should perform these steps multiple times:

  1. Form a new endpoint.
  2. Deploy new code to the new endpoint.
  3. Migrate the current data to the new back end.
  4. Suspend the old back end.
  5. Update all front ends to the current version.

After that, verifying the bug-fix performed by testers or continuous integration (CI) tools will require these steps again. This complexity makes it difficult to release bug-free blockchain applications, yet doing so puts organizations and their customers at risk of financial harm. Due to the high-risk nature of deploying blockchain applications, it’s critical that testing is included in the managerial vision and strategy.

To release blockchain apps with bug-free code, businesses should follow these guidelines:

Integrate Test Automation Into Your Blockchain Testing Strategy

Test automation can relieve testers from performing thousands of orchestrating tests manually, which is both difficult and inefficient. A good system architecture should be scalable, maintainable and testable, so teams can test components independently along with mocked components. If a test requires a different environment or infrastructure, infrastructure as code (IaC, such as Puppet, Chef, Ansible and AWS is invaluable in setting up appropriate test environments. Another crucial part of the strategy is to provide the infrastructure with declarative definitions and allow developers to implement codes that support test automation.

Run Unit and Integration Tests to Cover Both Back End and Front End Code

Blockchain applications contain at least a back end (a set of smart contracts or chain codes running on a blockchain) and a front end (where users can interact with data stored in the blockchain). Performing unit tests will cover both back end and front end code, and, because of its critical role to blockchain apps, its primary focus should be on the chain codes. Integration testing, however, should cover the various types of oracles and front end applications. Performing additional tests will eliminate any holes that can threaten the back end by verifying the integration between the UI and chain codes.

Perform Tests in a Local Infrastructure

Though public blockchains (such as Bitcoin or Ethereum) have several test-nets, it’s optimal to perform the tests in a local infrastructure. Local infrastructures are lightweight, faster and more stable for unit and integration tests. For example, in a Ganache local infrastructure, it’s possible to run more than 1,000 unit tests on five Ethereum smart contracts with approximately 3,000 deployments in an hour or less.

Continuously Update Security System Test Suites

Blockchain is a multi-party infrastructure and in some cases, it is a public network. As a result, these applications will be visible to many stakeholders and may even be open-sourced to the world. This level of transparency means that hackers are able to study the programs and plan attacks based on a particular system. Continuously updating security system test suites will ensure applications are protected against all common security vulnerabilities.

Minimize Continuous Testing Pipelines for Each Phase of the Development Process

Layering integration and unit tests in a local infrastructure with continuous updates to the security system test suites creates a continuous testing pipeline that is essential to high-quality blockchain code. Continuously verifying code changes in multiple environments, such as local blockchain and test-net, ensures high-quality code is delivered to the production blockchain. These tests, however, can last hours or days for each code change, so it’s important for teams to minimize and create lean pipelines that focus on test stages, test types and test environments, and develop multiple pipelines for code at each phase of the development process.

Build Customized Tests Suites to Eliminate Prospective Cheating Holes

Test teams also need to customize test suites in the pipelines to cover both functional and security testing. Covering security cases is important, but unit test modules should also exercise smart-contract-unit potential security threats, such as overflow and re-entrancy, to eliminate as many prospective cheating holes as possible.

Due to the nature of decentralization and orchestration of underlying infrastructure, developing bug-free code for blockchain applications presents many more challenges than other applications. By taking best practices from traditional software testing, especially test automation, and customizing them for blockchain development, businesses can achieve bug-free blockchain coding and protect their most vulnerable applications.

Filed Under: Application Performance Management/Monitoring, Blogs, Continuous Testing, DevOps Practice Tagged With: back end, blockchain apps, blockchain testing, bug-free code, continuous testing, front end, security testing, test automation

  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • More
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Tumblr (Opens in new window)

Like this:

Like Loading...
Sponsored Content
Featured eBook
Successful Scaling: 5 Critical Steps for DevOps Expansion

Successful Scaling: 5 Critical Steps for DevOps Expansion

Over the last five or six years, companies of all sizes have adopted DevOps practices and tools as a solution to increasing the speed and quality of releases. Typically, adoption starts with one or two pilot projects that demonstrate success with DevOps. But simply using the automation, requirements management and ... Read More
« Are Your Development Processes Truly Agile?
Junior Achievement »

Top Stories of the Week

  • View DevOps.com Privacy Policy

Latest from DevOps.com

Virtual Instruments Acquires Metricly to Monitor Cloud Costs
August 16, 2019 | Mike Vizard
JFrog swampUP: An Insight into Insight Partners
August 16, 2019 | Alan Shimel
Three Insights from the World’s Leading IT Organizations
August 16, 2019 | Deepak Jannu