# Realistic Web3 Mock by Daenam Kim (Devcon5)

- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2020-10-09
- Duration: 04:49
- Topics: blockchain, smart contracts, distributed ledger, ethereum, Science & Technology
- Watch: https://streameth.org/watch/yt-qyvq9-dPMH4
- YouTube: https://www.youtube.com/watch?v=qyvq9-dPMH4

## Description

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on IPFS and more.
https://archive.devcon.org/archive/watch/5/testing-dapps-with-realistic-web3-mocking

I will demonstrate using a Web3 Mock for UI testing of DApps. It can be difficult to test with actual transactions between the frontend and blockchain. This is because transactions must be signed by a private key, but UI testing frameworks cannot interact with Web3 providers to do so. 
A Web3 Mock solves this problem by signing transactions with a private key automatically and sending them to the blockchain. This offers developers better experiences writing blockchain apps. It uses open source technology and is compatible with a range of blockchain development environments including Ganache, PoA, and remote APIs like Infura. It is integrated with the popular TestCafe platform to perform full end-to-end DApp testing.

Speaker(s): Daenam Kim
Skill level: Beginner
Track: Developer Infrastructure
Keywords: technical

Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum
Learn more about devcon: https://www.devcon.org/
Learn more about ethereum: https://ethereum.org/ 

Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. 
Devcon 5 was held in Osaka, Japan on Oct 8 - 11, 2019.
Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/

## Transcript

[Applause] came from Korea today and talked about the realistic Matthew Mark to generate what in how and the problem I faced and then solutions in them first I wanted to make my tax evasion or whether but is he using watching as you guys right now about this was the biggest different from the just move on web pages using transaction transaction using that mass so I want to make this API sustained and calm this is our final goal and actually we built up the whole pipeline so put this I decided you to test a piece is amazing right test frame on the officers and to put your pictures up there but I can explain about a few things to create stable taxes we don't need to think about it how come we can't delay and wait for the rendering or agnostic runs process some of this will be automatically run and then support JavaScript in high speed and then death javascript error banging wrong your task the task everywhere start out the test and then launch concurrency and then the building we don't ask this is really fun part for developers to understand and why the complex the Almaty next Emma and finally we could use this in the CI using command introductions the Bromley is the test kappa business support man mask so I can define in this better grade but and actually find a small way to immediate matter mask from your profile but problem is just getting access to pop up in to click button something even actually shoot running in the headless mode it means there is no way to control any powers of the boxes but I find the way in MA it's a real tricky and - country little return the dummy transaction has in black number one numbers I enjoy it really really enjoyed in the past past but I found about something happens so I thought what but I looked into what happened in our system a national system one of our feature is seeking out the box GPA right in the backend in the return of the front hand side but the dummy transaction they like didn't happen actually watching so it means there's an off day and back it reaches nothing in the end so whatever I do and then I don't know but I didn't want to keep up so I found another way using back free it's a really simple and clean and create you have performed well free even actually these main key features here and include addressing private key and to sign transaction is kind of rolling and then easy to enable/disable and on the front end composite age and also we can call exactly same method we're training and we don't need man that's game on so it's really simple claim I'm gonna show you a demo this is one feature in multipaths we've built now and called artistic water it's what this will have the multiple honors in them and then the verbal requires and the required confirmations in the camp allowed to sign a transaction of multiple users as you can see it's deployed inside a transaction actually happened in the blockchain but there's no mana as interaction so we can make it clean and fast and so super inconvenient way so for this we complete the test and I passed test eventually I wasn't happy but this is not all for DUI testing that we found some bugs and solidity and gap recently it was really out really proud up there and also we realized the way overnight by testing to help keep our system safe also have contributed officers community so what I wanna see don't forget test you guys do okay thank [Applause]
