# Testing libraries for the Decentralized Web

DevFeed: [Testing libraries for the Decentralized Web](<https://devfeed.tech/articles/testing-libraries-for-the-decentralized-web-19052.md>)

Original publisher: [Read original article](<https://httptoolkit.com/blog/decentralized-web-testing-libraries/>)

Author: HTTP Toolkit; Tim Perry

Published: 2022-10-24T17:00:00Z

Content type: tutorial

Language: en

Sources: [HTTP Toolkit](<https://devfeed.tech/sources/http-toolkit.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [IPFS](<https://devfeed.tech/topics/ipfs.md>), [Ethereum](<https://devfeed.tech/topics/ethereum.md>), [Integration testing](<https://devfeed.tech/topics/integration-testing.md>), [ci](<https://devfeed.tech/topics/ci.md>), [WebRTC](<https://devfeed.tech/topics/webrtc.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [P2P](<https://devfeed.tech/topics/p2p.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>)

Tags: [ci](<https://devfeed.tech/tags/ci.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [decentralized-web](<https://devfeed.tech/tags/decentralized-web.md>), [ethereum](<https://devfeed.tech/tags/ethereum.md>), [hosting](<https://devfeed.tech/tags/hosting.md>), [integration-testing](<https://devfeed.tech/tags/integration-testing.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [testing](<https://devfeed.tech/tags/testing.md>), [web-applications](<https://devfeed.tech/tags/web-applications.md>), [webrtc](<https://devfeed.tech/tags/webrtc.md>)

## AI overview

This article introduces MockIPFS and Mockthereum, network interception libraries for IPFS and Ethereum. It explains how they support automated integration testing and CI workflows while also serving as foundations for network proxy tools for decentralized web applications.

## Source excerpt

The world of decentralized web applications is an exciting place that has exploded in recent years, with technologies such as IPFS and Ethereum opening up possibilities for a peer-to-peer web - creating applications that live outside the traditional client/server model, where users to interact and control their own data directly. At the same time, it's still immature, and for software developers it lacks a lot of the affordances & ecosystem of the traditional HTTP-based web app world. There's far fewer tools and libraries for developers working in this space. I've been working on improving this over the last year (as one part of a project funded by EU Horizon's Next Generation Internet initiative), by building network interception libraries for both IPFS & Ethereum: MockIPFS & Mockthereum. These each act as both an immediately useful automated testing library, to support modern integration testing & CI workflows, and a base for building more general network proxy tools for web applications using either (or both) technologies. If that sounds cool and you just want to jump straight in and try these for yourself, you can get started at github.com/httptoolkit/mockipfs/ and github.com/httptoolkit/mockthereum/. On the other hand, if you want to hear what this can do in practice, and learn a little about how it works under the hood, read on: A new way to build web apps Decentralized web apps often use a mix of many different technologies, at various layers of the stack, such as: IPFS - for decentralized static content hosting & data storage Ethereum - for decentralized consistent global state, computation on that state, and financial transactions Filecoin/Storj - for paid decentralized long-term content storage WebRTC - for peer-to-peer raw data transfer, and video/audio connections Service workers - a JavaScript API allowing fully offline web apps Handshake (HNS)/Ethereum Name System (ENS) - to map domain names to web applications GunDB - a decentralized database for the