$27.01 10.27%
NEO · 1w

Test-Driven Blockchain Development [John [email protected] Seattle on Medium]

Test-Driven Blockchain Development Toolkit for the Professional Programmer

There is an asymmetry that is interesting for people familiar with cryptography: as a developer, you can (re)create the production code if you have your test cases, but you cannot easily create the tests from your production code. So, the tests are a kind of collection of one-way functions — a trapdoor function; the implication is that the tests are perhaps more important than the production code itself.

There is also another asymmetry for people who have had to debug code (which is every developer in the world): developers using Test-Driven Development on a new project typically find that they tend to invoke a debugger less often than on a project without a test-first approach. Test-driven development, with robust version control, enables developers to revert back to the last version that passed all tests, and can be sometimes more productive than having to debug poor quality code.

With that preamble, let us delve into the practices of Test-Driven Development (TDD), and why we have built out the support for TDD in the Neo Blockchain Toolkit.


Testing does not have to dogmatically happen after the implementation; with TDD, testing goes first, reversing the legacy approach of developing the software and then testing it (typically, parts of it).

Why? The approach of writing a test that verifies the behavior of the expected feature, and then to write the code that implements the feature has two key implications; first, the test(s) are used as a compass to direct the developer to focus on the expected outcomes, and second, the tests are used a tracker to indicate how close the code to being completed.

What else? Further, with this approach, the developer then has a test or a test suite that can be repeatedly run to ensure that this feature and its behavior and outcomes work as expected even as other unrelated changes are made to the code ...

Continue on
Recent news
NEO +10.27% · · 6h

Predict When NEO Will hit $50

🔮 Price Prediction:💰 $NEO 🤑30 NEO #Giveaway! 3 Winners - 10 NEO each!📈Predict When NEO Will hit $501. Reply date/time when NEO hits $502. RT, Follow @o3_labs3. Make any transfer using new O3 Walle...
NEO +10.27% · · 19h

Neo Monthly Report - December 2020

Neo is an open-source, community driven platform that is leveraging the intrinsic advantages of blockchain technology to realize the optimized digital world of the future.
NEO +10.27% · · 21h

Only 5 items left in Neo3Preview5 checklist

Now We're preparing the checklist of neo3-preview5 for task collection. Since still much new features are not included in preview4 (.Net 5, Oracle, State Service, etc), we plan to make preview5 out as...