Innovation to pursue strategic ambitions
Emerging technologies can be seen as short-lived but at times become an integral part of business and IT strategies. These technologies such as Blockchain, Artificial Intelligence, Machine Learning, Computer Vision, Augmented Reality or Virtual Reality, Edge Computing; will be the backbone of technological innovations in the future. Organizations are experimenting or adopting these technologies to innovate in order to pursue their strategic ambitions.
So, what is the play of Blockchain in the marketplace? A report by Allied Market Research states that the global blockchain distributed ledger market accounted for $228 million in 2016, and is anticipated to reach $5,430 million by 2023, growing at a CAGR of 57.6% from 2017 to 2023. Therefore, there is steady momentum on adoption of Block chain across the industry segments.
Characteristics of blockchain
Before dwelling into the intricacies of testing Blockchain, let’s understand Blockchain & its characteristics; and why organizations want to explore Blockchain??
- Blockchain is a digitized, decentralized, distributed ledger system where data is stored in the form of blocks. Each block holds cryptographic hash of previous blocks
- Additions are possible only when majority of nodes approves the transactions. Blocks that are validated by the nodes in the network cannot be altered retroactively. Update to blocks or deletion is not permitted.
- Rules are immutable thus once deployed stays forever. These rules in certain context are also known as “Smart Contracts” which is a “set of rules in the form of programmable constructs that are capable of automatically enforcing themselves when predefined conditions are met”.
Future of trusted transactions
The key driving factors for Blockchain adoption is that it eliminates third-party intermediaries & reconciliation reduction, as it is transparent immutable records that are secure & encrypted. Hence considered as future for trusted and transparent transactions across industry segments.
Intricacies of blockchain testing
Now, what is unique about Blockchain and how should testing be conducted? Again, as in any other Test implementation, guiding principle is to go inside out. So, to start with test the underlying building blocks of blockchain or the core; and then go outwards towards the integrations points.
Inside-out testing of blockchain applications
Essentially, as a first step following should be validated for Blockchain applications
- Block size: Block that is getting added after validation is within permissible size and values are not getting truncated
- Chain size: Number of blocks that can be added to Blockchain. This is based on the implementation
- Link: Whether each block that is getting added after validation holds a cryptographic hash of the previous block
- Smart contract or rules: Validate programmable construct applied to add a blockchain
- Node: Since blockchain is a peer-to-peer distributed network and nodes can be heterogeneous, all heterogeneous nodes has to tested independently
- Platform: It is assumed that platform is already tested. However, as these platforms are still evolving, would suggest to do a sanity testing (like Ethereum, Openchain or any customized platform)
Once above aspects are validated, next step is to validate peripheral of the blockchain application
- Data: Data of the block is accurate as and when blocks are added, and encryption and decryption happens as expected
- Integration testing: Testing of APIs and interfaces as data feeds will come through these channels for Blockchain
- Performance testing: Creating live conditions of a blockchain implementation is a challenge. For example miners validating a transaction (there might be a surge in usage), network latency, throughput based on block size, network size, expected transaction size; and how long a query takes to return the output with specialized authentication protocol. So, performance becomes critical to emulate scenarios
- Security testing: Nodes holds the right to add blocks, and breach on nodes will impact entire blockchain. So, security testing of nodes is very important. Other than that with regards to secure transaction, some aspects to be pondered are secured hash, authentication, consensus algorithm, private keys for decryption and approval etc.
Other than the aforementioned aspects, need to validate compute, network and storage for any blockchain application since blocks are stored in a distributed heterogeneous network; nevertheless the throughput, or performance of network, to validate or mine the block. Consider an example of blockchain implemented for stock trading. There is a limited number of shares of a specific company. However, whenever shares are traded, it will add a new block depending on how blockchain is implemented for this usecase. The chain size keeps on increasing, which will need more storage. Since chain size is increasing, it will require powerful compute and higher network capacity, to validate new blocks getting added to chain.
Methodology & Skills
There is no specific methodology that should be inculcated to implement blockchain applications. However, as in digital transformation projects, blockchain implementation is more successful in a collaborative and agile environment, due to multiple touch points and involvement of multiple teams for validation over the nodes and network. All the more important, if it is heterogeneous node blockchain implementation.
In conjunction to digital testing skills, testers will need to have a deeper understanding of blockchain concepts and how it works end-to-end such as consensus algorithms, mining, adding a block. In addition to this, a strong background on microservices or API based data testing, and integration testing, as there will be multiple touch points for data feeds.
Use cases across industry segments
There are lot of use cases on blockchain that various industry segments are exploring. Some of them are
- Banking: Banks across the globe have started exploring blockchain implementation for cryptocurrencies. JPMC is planning to introduce one to settle payments between big institutions
- Insurance: A smart contract based blockchain is being used by insurer American International Group Inc. as a means of saving costs and increasing transparency
- Healthcare: A number of healthcare systems that store data on the blockchain have been pioneered including MedRec
- Supply chain: IBM and Walmart partnering to create a blockchain project that will monitor food safety
- Land registry: Land registry titles are now being stored on the blockchain in Georgia in a project developed by the National Agency of Public Registry
Gartner in a report mentions that current blockchain solutions are missing key components such as tokenization and decentralization, and within three to five years, many of these core technical challenges will be resolved.
Organizations should start incubating talent on blockchain to explore possibilities and build competencies. With regards to testing, a set of digital testing personnel`s who has technology inclination, can be upskilled. Testing services organizations can develop test harness for core validation of Blockchain, that will be re-usable. IT service providers can also invest in blockchain lab to simulate real life scenarios with heterogeneous nodes and mimicking network traffic & latency. This will provide a competitive advantage once Blockchain becomes mainstream.
Blockchain usecases consolidation by Matteo Gianpietro Zago