blockchain-app-testing
Blog

Specifics of testing blockchain-based apps

The a1qa team shares the information that might be helpful while testing blockchain-based apps.
18 April 2018
Blockchain app testing
Cybersecurity testing
Functional testing
Performance testing
The article by a1qa
a1qa

Blockchain is a popular and technically complicated subject. Initially the technology was created to serve the Bitcoin cryptocurrency. However as time went by the sphere of the blockchain application widened.

Today any product that uses database can be migrated to the blockchain.

However, it goes without saying that any product should be thoroughly tested before going live. In this article, we focus on testing of the decentralized blockchain-based apps.

Before getting down to testing peculiarities and recommendations, look through the list of terms you’ll need to get a better understanding of the article.

  • Block is a piece of code that contains a list of transactions. The first block in the chain is called the genesis block.
  • Blockchain is a constantly growing chain of blocks. The copies of the chain are stored on a number of computers (nodes) that partake in the network.
  • Cryptocurrency is digital money with no physical equivalent.
  • Bitcoin is a digital payment method and the most popular kind of cryptocurrency these days.
  • Ethereum is the second most popular cryptocurrency with the large market capitalization (second only to Bitcoin).
  • Fork is a change to the blockchain protocol that results in a chain split into two chains that will function independently.
  • Mining is the process by which transactions are verified and added to the blockchain, and also the means through which new Bitcoin are released.
  • Fee is the commission miners get for verifying a transaction and adding it to the blockchain.
  • Smart contract is the protocol that digitally facilitates the negotiation or performance of a contract.
  • Faucets are websites that give away small portions of Bitcoins for free.

Blockchain: what’s in this word for a software testing engineer?

In the first place, the blockchain is the software functionality. In 90% of cases it’s a type of a payment method.

Accordingly, tests should be almost the same as an engineer runs when testing the payment gateway system: transaction process verification, testing all payment components, checking whether additional requirements are met (e.g., terms of a smart contract) and no double-spending opportunities exist.

Three aspects to consider before starting testing blockchain-based apps

1. Specific testing environment

All transactions executed in the blockchain change its current state. In order to add or change any entry, miners’ resources are required. Miners, as you remember, charge fee for verifying a transaction and adding it to the block. That’s why it may appear to be too expensive to perform tests in the live environment.

On one of the a1qa projects, the execution of a single bitcoin transaction cost several hundred USD.

Employing a testnet for running tests will help to avoid losing money and cut down on QA costs. Testnet coins have nothing to do with the actual ones and testers get an opportunity to experiment with the application without being worried of breaking the blockchain.

The team may set up their local testnet or use one of publicly available. For Ethereum-based apps, the Ropsten Network can be used. It uses the same protocol as Ethereum does and allows to get free coins from a pool of the Ethereum faucet. Instantly.

And do not forget to return the left coins to the faucet website. This is the matter of courtesy.

Also keep it in mind that even if you prefer to use the testnet, you will also have to deal with miners who validate transactions in the network. However, they are not that numerous in the testnet as comparing to the real network. So it will take more time to validate the transaction.

To speed up testing, you can set up several virtual networks and start mining yourself. It will take less power than verification of real cryptocurrency transactions.

2. Transactions are irreversible

All blockchain-based apps are decentralized. This is the main idea behind them. Decentralization means that the app resides on numerous computers and its code can be accessed by anyone. As there is no central server, 99% of failures, errors that made it to the blockchain can not be reversed.

Knowing this, it becomes extremely important to make sure all transaction details are correct before sending them to the network. Any missed defect will be a critical one.

It makes the testers’ job even more responsible.

3. All transactions are paid

This point correlates with the first one. The tester’s task is to guarantee the mistake-free process of the transactions adding and processing in the network. However, as any transaction in the blockchain requires the fee, it makes testing process rather specific.

If you test in a real Bitcoin network, remember that besides the input itself, you’ll have to pay to miners to get your transaction processed.

In Ethereum, every transaction a certain number of gas, which is the special currency used in the network. Operations that require more computational resources cost more gas.

It’s also important to know the difference between the gas cost and gas price.

The gas cost is the amount of work that goes into something (e.g. the number of hours of labour). The gas price is similar to the hourly wage you pay for the work to be done. The combination of the two determines the total transaction fee.

Remember: if the gas price is very low, no one in the network will process it.

What types of testing are relevant for blockchain-based apps?

As we’ve already mentioned, testing of the blockchain products slightly differs from testing payment apps and looks like a functional testing of the payment gateway system.

Test plan will take into account the predefined requirements from stakeholders.

A software engineer should consider the requirements and think creatively to generate test ideas and cover the most improbable user scenarios.

High quality of the final product can be assured through the following standard testing types:

Functional testing will help to understand whether all the functional requirements have been implemented by the dev team.

Load testing will help to determine the capacity of the system that directly interacts with the blockchain.

Security testing. The blockchain is anonymous. Any holder of the private key will have access to the wallet and the right to sign the transactions. The system of keys storage and encrypting is yet vulnerable to security attacks. Pen testing will help to identify and eliminate the bottlenecks.

What tools will you need for testing?

The selection of the right testing tools is the first step to successful and effective testing. This is the list that might be considered by those who’ll have to ensure the blockchain-based apps:

  • Testnet indexing tool. For example, the website ropsten.etherscan.io allows to check the real-time wallet balance and the detailed information on any transaction.
  • Bug and test tracking tools.
  • It can be required to set up a local node for the given blockchain. There are various tools with comfortable UI that will help doing this.
  • API testing tools (Postman, soapUI).
  • Database testing tools.
  • Encoding and encryption software.

Will blockchain-based apps benefit from test automation?

Like on any other testing project, decentralized apps can be tested automatically.

What is more, given the sheer number of nodes and combinations that are likely to take part, automation of testing becomes an important need.

Test results can be easily compared by analyzing the real information in the network or sending requests to the testnet indexing website.

How to choose the testing team?

Not so many QA teams can boast of having worked with the blockchain technology. However, the following testing capabilities can compensate for the lack of experience: good knowledge of the customer’s domain, analytical mindset, skills in reading the code and pseudo code.

The tester that will be involved in testing the blockchain apps should follow the development of the technology, its forks and be good at numbers. Yes, there will be a lot of counting job with the blockchain verification.

Afterword

The technology of blockchain catches on and more and more industries open up its opportunities.

Considering the scale of its application, the growing level of users’ competence and the critical status of defects that get into the network, testing must be viewed as an integral part of the development lifecycle.

Book an obligation-free consultation by the a1qa pros and learn how our solutions will help your product hit the mark.

More Posts

Telecom trends 2024
15 April 2024,
by a1qa
5 min read
QA’s role in adopting telecom trends for 2024 
Let’s dive into the transformative trends set to redefine the telco industry in 2024 and discover QA strategies to adopt them with precision.
Cloud-based testing
Cybersecurity testing
Functional testing
General
Migration testing
Performance testing
QA trends
Quality assurance
Test automation
On the pulse of 2024: optimizing the adoption of eHealth trends with QA
15 February 2024,
by a1qa
4 min read
On the pulse of 2024: optimizing the adoption of eHealth trends with QA
Generative AI, cybersecurity, AR/VR — come and explore how these trends are reshaping the future of healthcare and how QA helps implement them with confidence.
Cybersecurity testing
Functional testing
Performance testing
QA trends
Navigating the future: QA trends that will define 2024. Part 2
30 January 2024,
by a1qa
4 min read
Navigating the future: QA trends that will define 2024. Part 2
We continue exploring QA trends, helping businesses remain competitive in 2024.
Cloud-based testing
Cybersecurity testing
QA trends
Quality assurance
The year in valuable conversations: recapping 2023 a1qa’s roundtables for IT executives 
8 December 2023,
by a1qa
3 min read
The year in valuable conversations: recapping 2023 a1qa’s roundtables for IT executives 
From dissecting novel industry trends to navigating effective ways of enhancing software quality — let’s recall all a1qa’s roundtables. Join us!
Big data testing
Cybersecurity testing
Functional testing
General
Interviews
Performance testing
QA trends
Quality assurance
Test automation
Usability testing
Web app testing
black-friday
22 November 2023,
by a1qa
4 min read
Get ready for Black-Friday-to-Cyber-Monday shopping: 5 testing types to include in your QA strategy
What’s your nightmare during Black Friday and Cyber Monday shopping? If it’s a loss of sales, read about the ways to prevent this in the article.
Cybersecurity testing
Functional testing
Localization testing
Performance testing
Usability testing
6 top reasons why business should invest in software quality
9 November 2023,
by a1qa
4 min read
6 top reasons why business should invest in software quality
We congratulate you on the World Quality Day with the article by Alina Karachun, Account director at a1qa, having 10+ years of QA expertise. Delve into it to explore the reasons why businesses should prioritize software quality.
Cybersecurity testing
Functional testing
General
Interviews
Performance testing
Quality assurance
3 November 2023,
by a1qa
4 min read
From idea to buying: 7 testing types to make your mobile eCommerce solutions flawless
Read the article to discover 7 QA activities helping boost mobile eCommerce solutions quality and provide end users with exceptional buying experiences.
Functional testing
General
Quality assurance
Test automation
Usability testing
streaming services
30 October 2023,
by a1qa
3 min read
Enable crash-proof streaming platforms for Holidays season
Ho ho ho! It’s time to prepare your streaming products for the influx of viewers. Read about how to put peak-load anxiety behind by applying rigorous testing of your IT solution.
Cybersecurity testing
Functional testing
Performance testing
Usability testing
On the way to Web 3.0: key software testing aspects for seamless digital experiences. Part 2
12 October 2023,
by a1qa
4 min read
On the way to Web 3.0: key software testing aspects for seamless digital experiences. Part 2
Let’s analyze essential software testing checks to improve the quality of the business-critical Web 3.0 functionality.
Cybersecurity testing
Functional testing
Performance testing
Quality assurance
Test automation
Usability testing

Get in touch

Please fill in the required field.
Email address seems invalid.
Please fill in the required field.
We use cookies on our website to improve its functionality and to enhance your user experience. We also use cookies for analytics. If you continue to browse this website, we will assume you agree that we can place cookies on your device. For more details, please read our Privacy and Cookies Policy.