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

5G impact
31 May 2021,
by a1qa
4 min read
5G network impact on mobile app testing
Check out what 5G connectivity will bring to the IT world and how it will modify mobile app testing.
Cybersecurity testing
Mobile app testing
Performance testing
29 April 2021,
by a1qa
4 min read
Addressing 4 security issues for digital transformation programs
Find out the top 4 safety challenges of digital transformation and a QA playbook to address them and contribute to a higher level of cybersecurity.
Cybersecurity testing
31 March 2021,
by a1qa
4 min read
QA scenario to introduce 6 eCommerce trends in 2021
Discover what trends will rule the eCommerce industry in 2021 and how QA can help implement them with confidence and ease.
Cybersecurity testing
Test automation
15 March 2021,
by a1qa
4 min read
Mobile app performance testing: getting high software efficiency
Explore 3 cornerstones of mobile app performance testing and QA steps on how to execute it successfully.
Mobile app testing
Performance testing
25 February 2021,
by a1qa
4 min read
9 QA points for delivering high-quality SaaS-based solutions
In the article, we’ve gathered 9 QA factors relying on the SaaS specifics that may help to perform SaaS testing with ease.
Cloud-based testing
Cybersecurity testing
Functional testing
Performance testing
Test automation
16 February 2021,
by a1qa
5 min read
Winning trust: 5 industries that need blockchain testing
Get to know what industries are prone to rapid transformation within blockchain solutions, and how their catch-all testing can help keep leading positions.
Blockchain app testing
Cybersecurity testing
Functional testing
Performance testing
29 January 2021,
by a1qa
4 min read
3 do’s and 3 don’ts in BFSI software testing
Considering BFSI to be a fast-paced industry, how to keep up with such velocity? We’ve prepared 3 do’s and 3 don’ts that help sustain the rush and high software quality.
Functional testing
Mobile app testing
Test automation
13 January 2021,
by a1qa
4 min read
Reaching HIPAA compliance for eHealth solutions through QA
We reveal the HIPAA’s data safety benchmarks and shed light on how software testing may help in its conformity.
Cybersecurity testing
Software lifecycle QA
30 November 2020,
by a1qa
5 min read
Acumatica: ensuring sound business operations with well-tested ERP system
Internal business activities are advancing, while ERP systems’ usage is growing rapidly. Explore how to ascertain their accurate work through timely applying QA.
Big data testing
Cybersecurity testing
ERP testing
Functional testing
Performance testing
Test automation

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.