DAPPCON 2018: Testing Matters: Improving Dapp Quality Processes - Rhian Lewis (B9Labs)
DappCon 2018 · July 2018 · 8:56
Rhian Lewis of B9Labs addresses dapp testing practices at DappCon 2018, covering processes for improving the quality of decentralized applications before they reach users. The talk explores how disciplined testing of smart contracts reduces the risk of costly bugs once code is live on Ethereum's mainnet.
Speakers
Topics
From DappCon 2018, hosted by Dappcon Berlin.
Transcript
so I'm a tester developer and among various things I do I'm a consultant an instructor for benign lab who provides training in development and other skills across different blockchain platforms and the reason I wanted to talk about testing is it's something that's really really super important obviously for all software projects but in terms of decentralized applications especially because we're kind of working in this awesome exciting world where amazingly clever people have operated on the kind of work fast and break things principle which is amazing because we wouldn't be where we are now if people haven't moved
fast and broken things but I think now is the time to start thinking in terms of the kind of processes that we're used to seeing not so much in big corporate slow moving companies but just in introducing more formal kind of processes into the development cycle where they might not necessarily exist so obviously in the past people tended to work on big waterfall projects where testing happens at the end the new cycle that we're all used to looks a lot more like this and in the middle we have tests and it really is this critical part of the project even if you don't
have somebody on the project who is called a tester quality is this kind of ongoing process that should be baked into every software development program and somebody needs to take charge of this even if this person is not hired as a Quality Assurance specialist lots of teams that simply aren't big enough to have somebody who's in charge of quality so we need to think about testing as a function rather than something that one person does because a decentralized application is about a lot more than a smart contract and making sure that a smart contract or smart contracts are
free from bugs we need to think about quality in a much more holistic way than that so I guess for everyone in the room who works as a developer everybody much as they don't want to admit it has this kind of idea of testers they're the people who sit there being annoying during the development process asking stupid questions because maybe you feel that they're not as technical as you are they tell you that you can't release something because they've found something that looks like a bug but it isn't and it's fair to say that in the past perhaps this has been a fair perception of some testers but the modern tester simply isn't like this on
an agile or XP project the duties of the test engineer or the Quality Assurance specialists call it what you may or the person who's in charge of this function would encompass all of these and the job of the tests are far from being at the end of the project starts right at the beginning in terms of developing the very first specifications in the acceptance criteria by which the project is defined before a line of code is written you need somebody to be thinking about quality because quality as I've said it's about far more than just an absence of bugs so you might find your tester doing all these things in fact I'd go as far as to say that if you're on a and blockchain project and the
person you've hired as a test engineer it's not doing all these things it's not capable of doing all these things then fire them because this is what they should be doing and so we all know that when you develop a decentralized application you have your smart contracts you write all your unit tests and of course that magically ensures that at the end of the process you have a decentralized application that everybody is happy with that there are no bugs ever ok this doesn't happen because a lot of the problems come with the things that are around the contract itself their problems in the UI api's databases third-party integrations you
need somebody to think about your application in a holistic way think about all the things that could go wrong and probably will go wrong for example um I've literally just thought about this so correct me if I'm wrong because I didn't look it up before the talk it just came into my head now there was a recent problem on an exchange where I think it was ray blocks it was before they became nano where it was possible for people to with keep withdrawing more than they had in their wallet because the verification of their account balance was done on the clients side now I'm sure there was some really good smart contract developers working on the contract to ensure that there wasn't
going to be a problem but nobody looked at it holistically and went what is the front end developer doing and that's why you need somebody to have this all-around awareness so you have to assume when you're developing and testing that somebody has not just really really bad intentions but that they're also really stupid you have to assume that there is no limit to the incompetence of a user or the inattention of a user who might walk walk away half way through using the app who might have their cat walking across the keyboard or what happens if you know what happens if there's a power outage
or something like that and somebody hasn't charged their laptop they walk away and leave it running you have to assume the worst consistently developers don't necessarily have time to do this and this is why you need somebody thinking about every single worst-case scenario that could possibly happen and when I said that testing is and quality is about a lot more than just the absence of bugs there was a really interesting talk I went to about this thing called charisma and a couple of years ago the guy who was doing the talk pointed out though it's with Apple products statistically applications built on Apple crash a lot more than applications
built on Microsoft yet the perception is because the all failures tended to happen silently and whereas a Microsoft app will kind of come up with the blue screen of death and say an error has occurred and people just think this is really crappy I don't want to use this and generally Apple products have charisma if you want to look at it this way for an end user whereas Microsoft is perceived to have less charisma so testing for how people perceive your application it's not looking for an absence of bugs it's actually looking for excellence in your product how do people use it if we're now coming to the points where people using these applications and not just
people who blockchain enthusiasts as they've been before they are the general public we need to provide clear messaging and good UX around what's actually happening especially in situations where feedback is not immediate how are we handling this how are we explaining to people what is actually happening behind the scenes and it's also in this in this context the job of the tester to think about things like the business model transaction fees when the acceptance criteria are being defined and thinking about what happens if transaction fees rise 10 times what happens if the network suffers traffic that increases by a hundred times we all saw what happened with crypt kitty's
thinking in terms of really dull but necessary things like GDP our ethical issues when we think about quality it needs to encompass all these things and I'm not sure I think I might have actually finished slightly early in an attempt to get through all this but I just do want to say if you see any of these leaflets around we're giving away places in the QA engineer course in order to do this you have to crack three challenges in some smart contracts that we've prepared so even if you don't want to do the course it's kind of a fun thing so I'd encourage everybody to pick up one of these and have a go at this and it shows
you the kind of stuff that we teach on the courses and in the meantime pop quality first when you're developing your doubts [Applause]