<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/end-to-end-testing-with-firebase-server-fh26qproz" -->

---
title: End-to-end Testing with firebase-server | daily.dev
description: A developer built firebase-server, an open-source Node module that mimics the Firebase Wire Protocol so end-to-end tests can run against a local server instead...
canonical: https://daily.dev/posts/end-to-end-testing-with-firebase-server-fh26qproz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: End-to-end Testing with firebase-server | daily.dev
og:description: A developer built firebase-server, an open-source Node module that mimics the Firebase Wire Protocol so end-to-end tests can run against a local server instead...
og:url: https://daily.dev/posts/end-to-end-testing-with-firebase-server-fh26qproz
og:image: https://api.daily.dev/og/posts/Fh26QpRoz.png
og:image:alt: End-to-end Testing with firebase-server
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# End-to-end Testing with firebase-server

**[Firebase](https://daily.dev/sources/firebase-blog)** · 4 min read · 0 upvotes · 0 comments

## Summary

A developer built firebase-server, an open-source Node module that mimics the Firebase Wire Protocol so end-to-end tests can run against a local server instead of the real Firebase cloud. This removes internet dependency and made the author's own tests run 40% faster. The post covers motivation, how to install and launch firebase-server, and a workaround for the client library's hostname requirement using a hosts file entry or a Node.js constructor override trick.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://firebase.blog/posts/2015/04/end-to-end-testing-with-firebase-server_16>

## Questions this post answers

### How can I run end-to-end tests against Firebase without needing an internet connection?

Use firebase-server, an open-source Node module that implements the Firebase Wire Protocol locally, so the real Firebase client library can connect to it instead of the cloud service. Install it via npm, start it with a port and hostname, and point the Firebase client to ws://test.firebase.localhost:5000 instead of the cloud URL. This removed internet dependency and made tests run 40% faster for the author.

_Developers wiring up offline-friendly test suites can find practical setups like this one on daily.dev._

### Why does connecting to a local Firebase test server require a hosts file entry?

The Firebase client library requires the hostname to contain exactly two dots, so a plain localhost address won't work. The workaround is adding an entry like '127.0.0.1 test.firebase.localhost' to the hosts file, then connecting via ws://test.firebase.localhost:5000. Alternatively, ws://127.0.1:5000 works in Chrome and Firefox, or in Node.js you can override the faye-websocket Client constructor.

_Anyone debugging tricky local test connection quirks can browse similar fixes on daily.dev._

## Similar posts on daily.dev

- [Testing Node.js APIs with Jest: A Frontend Developer's Guide to Backend Testing](https://daily.dev/posts/testing-node-js-apis-with-jest-a-frontend-developer-s-guide-to-backend-testing-ykfrkag4k) · SitePoint · 0 upvotes · 0 comments
- [Testing Firestore security rules without touching production](https://daily.dev/posts/testing-firestore-security-rules-without-touching-production-hniqyzuq6) · All Things Open · 1 upvotes · 0 comments
- [To test, or not to Test? Part 4 – Make it easy to test locally](https://daily.dev/posts/to-test-or-not-to-test-part-4-make-it-easy-to-test-locally-ij4em3xn7) · We Are .NET · 0 upvotes · 0 comments
- [The Node.js built-in test runner](https://daily.dev/posts/the-node-js-built-in-test-runner-qw7ywroa9) · Flavio Copes · 0 upvotes · 0 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#nodejs](https://daily.dev/tags/nodejs), [#firebase](https://daily.dev/tags/firebase)

[View this post on daily.dev](https://daily.dev/posts/end-to-end-testing-with-firebase-server-fh26qproz)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"End-to-end Testing with firebase-server","url":"https://daily.dev/posts/end-to-end-testing-with-firebase-server-fh26qproz","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/end-to-end-testing-with-firebase-server-fh26qproz"},"datePublished":"2026-08-23T12:20:22.613Z","dateModified":"2026-08-23T12:34:28.870Z","description":"A developer built firebase-server, an open-source Node module that mimics the Firebase Wire Protocol so end-to-end tests can run against a local server instead...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ed721de96163685d26ab7e314be3ebc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ed721de96163685d26ab7e314be3ebc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Firebase","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Firebase","logo":"https://media.daily.dev/image/upload/s--i395oqZH--/f_auto,q_auto/v1787487448/logos/firebase-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/firebase-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/end-to-end-testing-with-firebase-server-fh26qproz","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"testing,nodejs,firebase","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Firebase","item":"https://daily.dev/sources/firebase-blog"},{"@type":"ListItem","position":3,"name":"End-to-end Testing with firebase-server"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/end-to-end-testing-with-firebase-server-fh26qproz#faq","mainEntity":[{"@type":"Question","name":"How can I run end-to-end tests against Firebase without needing an internet connection?","acceptedAnswer":{"@type":"Answer","text":"Use firebase-server, an open-source Node module that implements the Firebase Wire Protocol locally, so the real Firebase client library can connect to it instead of the cloud service. Install it via npm, start it with a port and hostname, and point the Firebase client to ws://test.firebase.localhost:5000 instead of the cloud URL. This removed internet dependency and made tests run 40% faster for the author. Developers wiring up offline-friendly test suites can find practical setups like this one on daily.dev."}},{"@type":"Question","name":"Why does connecting to a local Firebase test server require a hosts file entry?","acceptedAnswer":{"@type":"Answer","text":"The Firebase client library requires the hostname to contain exactly two dots, so a plain localhost address won't work. The workaround is adding an entry like '127.0.0.1 test.firebase.localhost' to the hosts file, then connecting via ws://test.firebase.localhost:5000. Alternatively, ws://127.0.1:5000 works in Chrome and Firefox, or in Node.js you can override the faye-websocket Client constructor. Anyone debugging tricky local test connection quirks can browse similar fixes on daily.dev."}}]}
```

