Python — How to develop Automation framework for blockchain based application built on Ethereum
Background — Recently I have developed Testing Automation Framework for Private blockchain application built on Ethereum platform for capital market customer. Now I am trying to convert the same framework into generic Automation Framework for all kind of BlockChain application irrespective of the industry it is being built upon. Only one condition should satisfy to use this framework & which is — Application should be built on Ethereum development platform. Once I achieve that then definitely I would like to take this automation framework to next level where underlying development platform can also be different. Seems little harder for now but I am confident enough that I would be able to make this framework independent of underlying platform.
From where I got the idea — How did this journey start for me to develop my own Testing Automation Framework — Let me tell you an incident that had recently happened with me that ignite this thought — Currently I am working for one of the startup company which develops blockchain based products specially for Capital market customer. End customers actually want to leverage advantages of blockchain technology which are being claimed by the creators of this technology. To be more precise, all the products which are being developed over blockchain framework are targeting to cater various transactions within trade lifecycle to bring in more transparency, more robustness towards any security, no to minimum frauds in involved transactions, quick turn-around time for processing transactions. As blockchain technology is almost new & when it comes to developing private blockchain which is way different from public blockchain however core principles remain same whether it is public or private implementation. Now, triggering point for me when I started thinking to come up with automation framework for testing was — our whole group used to spend 2 days to complete regression suite for any new release which comes in our way. Before getting into Regression, we need to make sure that all new features, fixes & enhancements are working as expected as Regression can only be started once sprint testing gets completed without any major bug. It is needless to say that we are working in Agile methodology which is again increased the pain for Testers. Upon successful completion of regression, New release can be shipped to end customer. Interesting part to tell about this whole story is — testing new features/fixes/enhancements within any sprint requires from 1 to 2 days whereas Regression was taking minimum 2 days & can toss for 3rd day as well. That gave me a thought that it is not good for any testing team especially in agile methodology however blockchain based application has lots of components which are so different from all web/desktop applications we used to test. There is huge difference in terms of traditional testing done for existing any kind of application & blockchain based application.
Please refer following linkedin articles I wrote about on QA strategy for private blockchain application —
Private BlockChain QA strategy (Testing Techniques & Tools for Essential components-EVM for Smart Contracts) — Part 4
Private BlockChain QA strategy (Testing Techniques & Tools for Essential components-Peer To Peer Networking) — Part 5
Private BlockChain QA strategy (Testing Techniques & Tools for Essential components- Consensus Algorithm (RAFT) — Part 6
Private BlockChain QA strategy (Testing Techniques & Tools for Essential components — BlockChain Data Storage — Part 7
Private BlockChain QA strategy (Testing Techniques & Tools for Essential components) — RESTful webservices to define End points for Ethereum — Part 8
Once you go through all these articles then you will have good insight about why testing of blockchain based applications are way different from traditional application testing. I am assuming you would have gone through with all those articles to continue on this. Even if you don’t read all of them in one go which is quite obvious then at least cover this one BlockChain Application — Essential Components before reading further…
How did I finalize my approach to develop automation on Python — Since I was having enough insight about all involved components then I planned to automate the Regression suite to have less time spend on Regression that sprint testing. I always have inclination towards technology & want keep coder inside me alive forever. Another challenge I need to overcome is — BlockChain is almost new technology which is still getting evolved so there are no tools or platform available through which Automation can be done. I started to think what should I do now? Fortunately, I was trying to get the solution for very basic problem related smart contract debugging process in truffle framework on youtube so I came across with Python programming tutorial advertisement by Udemy on youtube The person who was advertising that he said “You can do anything with Python” then I thought If anything can be done with Python then why can’t I create my own automation framework for blockchain based application. From that point I started learning Python for the first time & focused on those modules of python which can help me to design testing logic of essential components those make up blockchain application. I must confess that automating blockchain based application testing by using Python is the most easiest automation framework development I did ever in my life.
As always I was thinking to complete in one blog but does not seem to happen so stay tune for next part to get more detail…..
Keep learning & be innovative..