QA for Blockchain Technologies

For technologies like blockchain, Quality Assurance is an indispensable process. Blockchain projects cannot afford critical bugs because they promise users security, anonymity, speed, and uptime by themselves. Especially when it comes to big money or information, quality is everything. And taking into account the growing popularity and the number of competitors, developers also have to think about UI/UX, design, and other qualities that can make a solution stand out favorably. 

We have prepared a checklist that contains all the key points that need to be tested for blockchain products. And also, we have compiled a list of effective tools that will help with this. The article will be equally useful for both developers and testers, so let’s begin. 

What is blockchain and why is it so in demand?

Of course, many users associate this technology exclusively with cryptocurrency, but in fact, the capabilities of the blockchain lie much wider than the boundaries of the cryptocurrency market. Today it is often compared to the Internet in times of its formation: many have heard, some even used it, but only a few understand how it works.

We can say that if you are involved in this area, then the future belongs to you.

So what is Blockchain? In simple words, it is a chain of blocks that sequentially convey important information. So what’s the catch? – This system is decentralized. This chain cannot be deleted or overwritten by one of its contacts since any change needs to be confirmed by all contacts participating in the chain. So it is highly reliable.

Despite the limitless possibilities, today 90% of the power of this technology is used for virtual currency transactions. Therefore, QA testers consider blockchain as a payment system.

Among the benefits that users receive:

  • The anonymity of transactions 
  • Exclusion of a third party 
  • Protection and impossibility to change data
  • High transaction speed
  • Low transfer fees

But, this system is not only technically complicated but also not ideal. Today, dApps (decentralized applications), such as wallets, exchanges, exchangers, etc., appear on the market every day. Some of them are in such a hurry to enter the market that they prefer not to pay enough attention to testing, as this delays the release (which in itself is not true). As a result, even critical bugs that were not noticed by the developers can appear after the release.

The ultimate way to test your blockchain product 

In total, there are 4 most important components for testing such products:

  • Event sources or transactions
  • Block sources or transaction committers
  • Blocks recipients or readers
  • Committed transactions

Checklist for Testing:

# 1 Testing Approaches

Blockchain QA is about combining several approaches with different opportunities:

  • The white-box approach (glass-box testing) is a software testing method that assumes that the internal structure/device/implementation of the system is known to the tester (testing from the developer’s point of view). Knowledge of all the features of the program under test and its implementation is a must for this technique.
  • The Black-box approach – specification-based testing or behavior testing is a testing technique based on working exclusively with the external interfaces of the system under test (testing from the users’ point of view).
  • The Gray-box approach is a software testing method that involves a combination of White Box and Black Box approaches. That is when we only partially know the internal structure of the program. It is assumed, for example, access to the internal structure and algorithms of the software for writing the most effective test cases, but the testing itself is carried out using the black box technique, that is, from the user’s point of view.

The next step, which is relevant for any of the above approaches, is functional and non-functional testing of Blockchain products.

# 2 Functional Testing

This type of testing is the most capacious, as it includes testing all the functionality of the product. The wallet integration, the interface, the cross-browser/cross-platform testing is carried out, dApp (decentralized application) business rules are checked for compliance.

Testing types:

  • Unit or module testing is the testing of individual parts of a contract. It is carried out by modeling, accounting, and predicting all possible conditions that are embedded in the logic of each specific contract. The most commonly used tools for this are Truffle/Embark/Dapple/Populus.
  • Integration testing – helps to detect errors in the interaction of integrated units. dApps cannot function separately and independently. They depend on the quality of integration with other systems that provide access to real data (such as Smart Contracts).
  • API testing. The Application Programming Interface is an interface through which one program can communicate with another. For testing engineers use special tools that can send input data in a request and check the accuracy of the output data, such as Postman or soapUI.

#3 Non-Functional Testing

This type of testing is responsible for the productivity and security of the solution (for example, the correct operation of the authentication signature, performance with large transaction volumes, etc.)

Non-Functional testing types:

  • Security testing. For some reason, at the mention of security, everyone thinks of hacker attacks, but much more often such applications have problems that are not related to attacks, but no less dangerous for customers and their money: authentication system bugs, for example.
  • Load testing. The product should work quickly and stably, even under heavy load. How can it be checked? By imitating such an environment.
  • UI testing. The developers of such solutions sometimes forget about the end-user perspective. For them, reliability and continuity are more important. This is why most dApps are not user-friendly and not intuitive.

Our Top 5 apps Testing Tools

Few QA professionals can boast of experience with blockchain technology. But the lack of experience can be compensated by a good understanding of the subject area, an analytical mindset, skills in reading code and pseudocode, as well as knowledge of tools that will help in testing.

#1 Gremlin

A handy tool to recreate a real-world crash or code update environment for stability testing. This is the unique principle of Chaos Engineering. Gremlin creates difficulties for the application under test, such as network lags, congestion, disconnected protocols, etc. A real stress test for your product.

#2 MixBytes Tank

MixBytes Tank is a console tool that can set up a blockchain cluster in minutes in a cloud (Digital Ocean, Google Cloud Engine, etc.) and bench it using various transaction loads. It’ll highlight blockchain problems and give insights into the performance and stability of the technology.

#3 Madt

Madt is an interesting young product for testing distributed systems based on Python. It allows to the creation of the required network topology by using a simple configuration script. Madt can be used for blockchain testing – there is a test for p2p networks based on the Kademlia protocol. The test is meant to check the status of the data in case of gradually increasing delays of data transfer to the nodes. 

#4 Truffle

A world-class development environment, testing framework, and asset pipeline for blockchains using the Ethereum Virtual Machine (EVM). If you want to automate blockchain testing, you can use this tool. It allows you to write test cases both in JavaScript and Solidity. 

 #5 Corda Testing Tools

This is an open-source platform that contains testing functions. It allows writing tests for contract validation, to conduct load and integration tests using Java and IntelliJ. It also suits automation.