{"id":1360,"date":"2026-02-26T10:46:00","date_gmt":"2026-02-26T10:46:00","guid":{"rendered":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/?post_type=blog&#038;p=1360"},"modified":"2026-02-26T18:09:26","modified_gmt":"2026-02-26T18:09:26","slug":"meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness","title":{"rendered":"Meet Dejavu: Deterministic Network Testing for Swift (without the flakiness)"},"content":{"rendered":"\n<p class=\"undefined block-editor-paragraph\">If your iOS tests touch the network, you\u2019ve probably felt the pain: they get&nbsp;<strong>slow<\/strong>, they get&nbsp;<strong>flaky<\/strong>, and they sometimes fail for reasons that have nothing to do with your code. We built&nbsp;<strong>Dejavu<\/strong>&nbsp;to make those tests boring\u2014in the best possible way.<\/p>\n\n\n\n<p class=\"undefined block-editor-paragraph\"><strong>Dejavu<\/strong>&nbsp;is Esri\u2019s open\u2011source, Swift\u2011native library that&nbsp;<strong>records<\/strong>&nbsp;real HTTP requests and&nbsp;<strong>replays<\/strong>&nbsp;them later, so your test suite runs fast and predictably. It plugs into&nbsp;<code>URLSession<\/code>&nbsp;via&nbsp;<code>URLProtocol<\/code>, stores request\/response pairs in a&nbsp;<strong>SQLite<\/strong>&nbsp;cache, and plays them back on demand\u2014all while fitting neatly into XCTest.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Project page:&nbsp;<a href=\"https:\/\/github.com\/Esri\/Dejavu\">github.com\/Esri\/Dejavu<\/a><\/li>\n\n\n\n<li>Package details:&nbsp;<a href=\"https:\/\/swiftpackageindex.com\/Esri\/Dejavu\">Swift Package Index<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-why-we-built-it\">Why we built it<a href=\"https:\/\/devtopia.esri.com\/har14220\/blog-posts\/blob\/main\/Dejavu-Engineering-blog.md#why-we-built-it\"><\/a><\/h2>\n\n\n\n<p class=\"undefined block-editor-paragraph\">Around 2017, across our ArcGIS Maps SDK for Swift development, we ran thousands of tests that exercised geospatial services and large, nested payloads\u2014think routing, analysis, tiles, search, and cloud APIs. Then as the&nbsp;<strong>scale<\/strong>&nbsp;and&nbsp;<strong>variety<\/strong>&nbsp;of our tests grew (today we are <a href=\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/testing-arcgis-maps-sdks-for-native-apps-a-behind\u2011the\u2011scenes-look\">over 200,000 tests across our Native Maps SDKs<\/a>), the typical network hazards (latency spikes, rate limits, service downtime) crept into CI and increasingly slowed teams down. When we looked for network mocking tools, no tool did everything we wanted. We decided to build a tool so that we could have tests that were:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Deterministic<\/strong>: same inputs, same outputs, every run.<\/li>\n\n\n\n<li><strong>Swift\u2011native<\/strong>: nothing that fights modern concurrency or XCTest.<\/li>\n\n\n\n<li><strong>Scalable<\/strong>: able to handle big payloads and lots of concurrent requests.<\/li>\n<\/ul>\n\n\n\n<p class=\"undefined block-editor-paragraph\">Dejavu is the tool we wished existed\u2014so we open\u2011sourced it.<br><em>(ArcGIS Maps SDK for Swift samples show the breadth of workflows we exercise:&nbsp;<a href=\"https:\/\/github.com\/Esri\/arcgis-maps-sdk-swift-samples\">arcgis-maps-sdk-swift-samples<\/a>)<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-dejavu-is-in-one-paragraph\">What Dejavu is (in one paragraph)<a href=\"https:\/\/devtopia.esri.com\/har14220\/blog-posts\/blob\/main\/Dejavu-Engineering-blog.md#what-dejavu-is-in-one-paragraph\"><\/a><\/h2>\n\n\n\n<p class=\"undefined block-editor-paragraph\">Dejavu intercepts&nbsp;<code>URLSession<\/code>&nbsp;requests during a&nbsp;<strong>recording<\/strong>&nbsp;run and writes each request and its server response to a local&nbsp;<strong>SQLite<\/strong>&nbsp;database. In&nbsp;<strong>playback<\/strong>&nbsp;runs, the same requests are intercepted and matched to the recorded entries; the&nbsp;<strong>exact<\/strong>&nbsp;responses are returned instantly, without hitting the network. The result: tests that are&nbsp;<strong>fast<\/strong>,&nbsp;<strong>repeatable<\/strong>, and&nbsp;<strong>resilient<\/strong>&nbsp;(with modes you can toggle per run).<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>See modes and usage overview in the README:&nbsp;<a href=\"https:\/\/github.com\/Esri\/Dejavu\">GitHub \u2192 Esri\/Dejavu<\/a><\/li>\n\n\n\n<li>SPI overview:&nbsp;<a href=\"https:\/\/swiftpackageindex.com\/Esri\/Dejavu\">swiftpackageindex.com\/Esri\/Dejavu<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-you-get-day-one\">What you get (day one)<a href=\"https:\/\/devtopia.esri.com\/har14220\/blog-posts\/blob\/main\/Dejavu-Engineering-blog.md#what-you-get-day-one\"><\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Speed<\/strong>: No real network calls during playback\u2014tests finish faster.<\/li>\n\n\n\n<li><strong>Reliability<\/strong>: Eliminate flakiness caused by external services.<\/li>\n\n\n\n<li><strong>Isolation<\/strong>: Run end\u2011to\u2011end flows without credentials or live endpoints.<\/li>\n\n\n\n<li><strong>Native fit<\/strong>: Built around&nbsp;<code>URLProtocol<\/code>&nbsp;and XCTest patterns\u2014no awkward harnesses.<br><em>(Architecture and defaults described in the GitHub README:&nbsp;<a href=\"https:\/\/github.com\/Esri\/Dejavu\">Esri\/Dejavu<\/a>)<\/em><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-it-works-high-level-no-code\">How it works (high level, no code)<a href=\"https:\/\/devtopia.esri.com\/har14220\/blog-posts\/blob\/main\/Dejavu-Engineering-blog.md#how-it-works-high-level-no-code\"><\/a><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Intercept<\/strong>: Register Dejavu\u2019s&nbsp;<code>URLProtocol<\/code>&nbsp;for the&nbsp;<code>URLSession<\/code>&nbsp;your tests use.<\/li>\n\n\n\n<li><strong>Record<\/strong>: In a recording mode, write the full request\/response pair to a SQLite file. We use <code>Record<\/code> only as needed. For example, we create a fresh recording when tests change, requests change (params, headers, etc.), or when we need to resync with services.<\/li>\n\n\n\n<li><strong>Match<\/strong>: On future runs, match outgoing requests to recorded ones.<\/li>\n\n\n\n<li><strong>Replay<\/strong>: Return the exact recorded response locally\u2014no live I\/O.<br><em>(Usage overview and modes documented in the package:&nbsp;<a href=\"https:\/\/github.com\/Esri\/Dejavu\">GitHub<\/a>,&nbsp;<a href=\"https:\/\/swiftpackageindex.com\/Esri\/Dejavu\">SPI<\/a>)<\/em><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"382\" src=\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong-1024x382.png\" alt=\"\" class=\"wp-image-1630\" srcset=\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong-1024x382.png 1024w, https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong-300x112.png 300w, https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong-768x286.png 768w, https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong.png 1119w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-modes\">Modes<\/h3>\n\n\n\n<p class=\"undefined block-editor-paragraph\">Dejavu ships with multiple&nbsp;<strong>modes<\/strong>&nbsp;you can switch via configuration or env vars (for example, playback on PRs):&nbsp;<code>.cleanRecord<\/code>,&nbsp;<code>.supplementalRecord<\/code>, and&nbsp;<code>.playback<\/code>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>First time (or you want a clean slate): use\u00a0<code>.cleanRecord<\/code><\/strong><br>Think \u201cfresh record.\u201d It wipes the DB and records everything again\u2014perfect when you\u2019re setting up Dejavu the first time or the API payloads changed.<br><\/li>\n\n\n\n<li><strong>Adding new tests\/endpoints: use\u00a0<code>.supplementalRecord<\/code><\/strong><br>Keeps what you already recorded and\u00a0<strong>adds<\/strong>\u00a0any missing calls. Great for growing coverage without nuking your existing cache. <br><code><strong>.supplementalRecord<\/strong><\/code> is configurable to be <code><strong>.supplementalRecord(.updateExisting)<\/strong><\/code> (default) or <code><strong>.supplementalRecord(.insertNew)<\/strong><\/code>.<br><\/li>\n\n\n\n<li><strong>Day\u2011to\u2011day mock testing (fast + deterministic): use\u00a0<code>.playback<\/code><\/strong><br>Runs your tests against the local recordings with zero live network, so CI and PRs stay quick and stable.<br><\/li>\n\n\n\n<li><strong>Real network debugging: use&nbsp;<code>.disabled<\/code><\/strong><br>Turns Dejavu off so requests hit the real services\u2014handy when you\u2019re chasing a live issue.<\/li>\n<\/ul>\n\n\n\n<p class=\"undefined block-editor-paragraph\">Mode definitions:&nbsp;<a href=\"https:\/\/swiftpackageregistry.com\/Esri\/Dejavu\">Swift Package Registry<\/a>,&nbsp;<a href=\"https:\/\/github.com\/Esri\/Dejavu\">README<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-a-quick-look-at-performance\">A quick look at performance<a href=\"https:\/\/devtopia.esri.com\/har14220\/blog-posts\/blob\/main\/Dejavu-Engineering-blog.md#a-quick-look-at-performance\"><\/a><\/h2>\n\n\n\n<p class=\"undefined block-editor-paragraph\">To illustrate the idea, we pointed a sample test at&nbsp;<strong>JSONPlaceholder<\/strong>\u2014a popular, free fake REST API (<a href=\"https:\/\/jsonplaceholder.typicode.com\/\">jsonplaceholder.typicode.com<\/a>)\u2014and measured the same test with and without playback:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Recording (<code>.cleanRecord<\/code>)<\/strong>: 1 test in&nbsp;<strong>0.068s<\/strong><\/li>\n\n\n\n<li><strong>Playback (<code>.playback<\/code>)<\/strong>: 1 test in&nbsp;<strong>0.005s<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"undefined block-editor-paragraph\">It\u2019s a simple example, but it demonstrates the core benefit: once recorded, playback avoids network overhead and variability. Your numbers will vary based on payload size and the number of requests per test, but the pattern is consistent.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>About JSONPlaceholder:&nbsp;<a href=\"https:\/\/jsonplaceholder.typicode.com\/\">jsonplaceholder.typicode.com<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-where-we-use-it-at-esri\">Where we use it at Esri<a href=\"https:\/\/devtopia.esri.com\/har14220\/blog-posts\/blob\/main\/Dejavu-Engineering-blog.md#where-we-use-it-at-esri\"><\/a><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-arcgis-maps-sdk-for-swift-and-its-toolkit\">ArcGIS Maps SDK for Swift and its toolkit<\/h3>\n\n\n\n<p class=\"undefined block-editor-paragraph\">We rely on Dejavu to stabilize and speed up tests for the&nbsp;<strong>ArcGIS Maps SDK for Swift<\/strong>&nbsp;and its <strong>toolkit<\/strong>, both of which exercise complex geospatial workflows and large datasets. By removing network variability from the critical path, our test runs are faster and CI gets more predictable.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ArcGIS Swift ecosystem:&nbsp;<a href=\"https:\/\/github.com\/Esri\/arcgis-maps-sdk-swift-samples\">Samples repo<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/developers.arcgis.com\/swift\/\">Developer site<\/a>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-arcgis-field-maps\">ArcGIS Field Maps<\/h3>\n\n\n\n<p class=\"undefined block-editor-paragraph\">The ArcGIS Field Maps development team uses Dejavu extensively for testing <a href=\"https:\/\/apps.apple.com\/us\/app\/arcgis-field-maps\/id1515671684\">its app for iOS devices<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-operational-tips-for-teams-so-you-can-drop-it-into-ci\">Operational tips for teams (so you can drop it into CI)<a href=\"https:\/\/devtopia.esri.com\/har14220\/blog-posts\/blob\/main\/Dejavu-Engineering-blog.md#operational-tips-for-teams-so-you-can-drop-it-into-ci\"><\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Cache strategy<\/strong>: Store SQLite recordings per test; cache across CI runs to avoid re\u2011recording.<\/li>\n\n\n\n<li><strong>Usage<\/strong>: Treat recordings as test data\u2014version them alongside code and refresh when APIs evolve.<\/li>\n<\/ul>\n\n\n\n<p class=\"undefined block-editor-paragraph\">All of the wiring details, including&nbsp;<code>URLProtocol<\/code>&nbsp;registration\/unregistration and examples, live in the repo\u2019s README and example projects.<br><em>(Start here:&nbsp;<a href=\"https:\/\/github.com\/Esri\/Dejavu\">github.com\/Esri\/Dejavu<\/a>)<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-security-and-privacy-important-in-real-projects\">Security and privacy (important in real projects)<a href=\"https:\/\/devtopia.esri.com\/har14220\/blog-posts\/blob\/main\/Dejavu-Engineering-blog.md#security-and-privacy-important-in-real-projects\"><\/a><\/h2>\n\n\n\n<p class=\"undefined block-editor-paragraph\">Recordings can contain sensitive data (headers, bodies, query params). We recommend:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Redacting<\/strong>&nbsp;credentials and personal data in the recording phase.<\/li>\n\n\n\n<li><strong>Scoping access<\/strong>&nbsp;to caches in CI (avoid committing secrets to VCS).<\/li>\n\n\n\n<li><strong>Pinning environment<\/strong>&nbsp;variables (locale, time zone) to maximize determinism.<\/li>\n<\/ul>\n\n\n\n<p class=\"undefined block-editor-paragraph\">The package surfaces configuration points and guidance to help you do this right.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Configuration overview:&nbsp;<a href=\"https:\/\/github.com\/Esri\/Dejavu\">GitHub README<\/a>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-redacting-credentials-and-personal-data-in-the-recording-phase\">Redacting credentials and personal data in the recording phase<\/h3>\n\n\n\n<p class=\"undefined block-editor-paragraph\">The following snippet shows how you can replace credentials and personal information with dummy values to ensure sensitive data remains safe.<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-swift\" data-lang=\"Swift\"><code>let configuration = DejavuSessionConfiguration(...)\n configuration.queryParameterReplacements = [\n &quot;apikey&quot;: &quot;dummyAPIKey&quot;,\n &quot;client_id&quot;: &quot;dummyClientID&quot;,\n &quot;client_secret&quot;: &quot;dummyClientSecret&quot;,\n &quot;token&quot;: &quot;dummyToken&quot;,\n &quot;username&quot;: &quot;dummyUsername&quot;,\n &quot;password&quot;: &quot;dummyPassword&quot;\n ]\n configuration.jsonResponseKeyValueReplacements = [\n &quot;access_token&quot;: &quot;dummyToken&quot;,\n &quot;token&quot;: &quot;dummyToken&quot;,\n &quot;expires&quot;: Date.distantFuture.timeIntervalSince1970 * 1_000,\n &quot;expires-in&quot;: Date.distantFuture.timeIntervalSince1970 * 1_000\n ]\n configuration.authenticationTokenParameterKeys = [&quot;token&quot;]\n configuration.authenticationHeaderParameterKeys = [\n &quot;Authorization&quot;\n ]\n \n try Dejavu.startSession(configuration: configuration)<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-limitations-and-when-not-to-use-dejavu\">Limitations (and when not to use Dejavu)<a href=\"https:\/\/devtopia.esri.com\/har14220\/blog-posts\/blob\/main\/Dejavu-Engineering-blog.md#limitations-and-when-not-to-use-dejavu\"><\/a><\/h2>\n\n\n\n<p class=\"undefined block-editor-paragraph\">Dejavu is ideal for HTTP request\/response flows. It isn\u2019t a drop\u2011in for real\u2011time streaming or custom socket protocols where&nbsp;<strong>timing semantics<\/strong>&nbsp;matter more than payload determinism. Some chaos scenarios (e.g., partial reads, mid\u2011stream disconnects) may need purpose\u2011built harnesses rather than pure playback.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Community discussion touches on timing nuances with&nbsp;<code>URLProtocol<\/code>:&nbsp;<a href=\"https:\/\/forums.swift.org\/t\/introducing-dejavu-the-open-source-network-mocking-library-for-swift-developers\/69360\">Swift Forums introduction thread<\/a>).<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-license-community-and-where-to-learn-more\">License, community, and where to learn more<a href=\"https:\/\/devtopia.esri.com\/har14220\/blog-posts\/blob\/main\/Dejavu-Engineering-blog.md#license-community-and-where-to-learn-more\"><\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>License<\/strong>: Apache 2.0<\/li>\n\n\n\n<li><strong>Source &amp; docs<\/strong>:&nbsp;<a href=\"https:\/\/github.com\/Esri\/Dejavu\">github.com\/Esri\/Dejavu<\/a><\/li>\n\n\n\n<li><strong>Swift Package Index<\/strong>:&nbsp;<a href=\"https:\/\/swiftpackageindex.com\/Esri\/Dejavu\">swiftpackageindex.com\/Esri\/Dejavu<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"undefined block-editor-paragraph\">We welcome issues and pull requests on GitHub. If you\u2019re curious about how we use Dejavu across Esri apps, browse our sample code and developer site for the ArcGIS Maps SDK for Swift.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ecosystem links:&nbsp;<a href=\"https:\/\/github.com\/Esri\/arcgis-maps-sdk-swift-samples\">Samples<\/a>,&nbsp;<a href=\"https:\/\/developers.arcgis.com\/swift\/\">Developers site<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-ready-to-give-it-a-try\">Ready to give it a try?<a href=\"https:\/\/devtopia.esri.com\/har14220\/blog-posts\/blob\/main\/Dejavu-Engineering-blog.md#ready-to-give-it-a-try\"><\/a><\/h2>\n\n\n\n<p class=\"undefined block-editor-paragraph\">If your network\u2011dependent tests are slowing you down or failing for all the wrong reasons, record them once and let&nbsp;<strong>Dejavu<\/strong>&nbsp;do the rest. Flip your CI into playback mode and enjoy faster, quieter test runs\u2014so you can focus on shipping features.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Project page<\/strong>&nbsp;\u2192&nbsp;<a href=\"https:\/\/github.com\/Esri\/Dejavu\">github.com\/Esri\/Dejavu<\/a><\/li>\n\n\n\n<li><strong>Package details \u2192&nbsp;&nbsp;<\/strong><a href=\"https:\/\/swiftpackageindex.com\/Esri\/Dejavu\">Swift Package Index<\/a> <\/li>\n\n\n\n<li><strong>Install &amp; Quickstart<\/strong>\u00a0\u2192 See the README, installation guide, and the <a href=\"https:\/\/github.com\/Esri\/Dejavu\/blob\/main\/AdditionalDocumentation\/MockedDataSetupInstructions.md\">location configuring<\/a> page in the repo<\/li>\n\n\n\n<li><strong>Examples<\/strong>\u00a0\u2192 Explore sample projects in\u00a0<code><a href=\"https:\/\/github.com\/Esri\/Dejavu\/tree\/main\/Examples\">\/Examples<\/a><\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"undefined block-editor-paragraph\"><\/p>\n","protected":false},"author":25,"featured_media":0,"parent":0,"menu_order":0,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17],"tags":[97,94,14,95,34,96],"class_list":["post-1360","blog","type-blog","status-publish","format-standard","hentry","category-testing-qa","tag-ci","tag-dejavu","tag-holistci-testing","tag-network-mocking","tag-swift","tag-xctest"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.2 (Yoast SEO v25.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Meet Dejavu: Deterministic Network Testing for Swift (without the Flakiness) - Esri Software Engineering Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Meet Dejavu: Deterministic Network Testing for Swift (without the flakiness)\" \/>\n<meta property=\"og:description\" content=\"If your iOS tests touch the network, you\u2019ve probably felt the pain: they get&nbsp;slow, they get&nbsp;flaky, and they sometimes fail for reasons that have nothing to do with your code. We built&nbsp;Dejavu&nbsp;to make those tests boring\u2014in the best possible way. Dejavu&nbsp;is Esri\u2019s open\u2011source, Swift\u2011native library that&nbsp;records&nbsp;real HTTP requests and&nbsp;replays&nbsp;them later, so your test suite runs [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness\" \/>\n<meta property=\"og:site_name\" content=\"Esri Software Engineering Blog\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T18:09:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1119\" \/>\n\t<meta property=\"og:image:height\" content=\"417\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness\",\"url\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness\",\"name\":\"Meet Dejavu: Deterministic Network Testing for Swift (without the flakiness) - Esri Software Engineering Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong-1024x382.png\",\"datePublished\":\"2026-02-26T10:46:00+00:00\",\"dateModified\":\"2026-02-26T18:09:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness#primaryimage\",\"url\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong.png\",\"contentUrl\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong.png\",\"width\":1119,\"height\":417},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Meet Dejavu: Deterministic Network Testing for Swift (without the flakiness)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/#website\",\"url\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/\",\"name\":\"Esri Software Engineering Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Meet Dejavu: Deterministic Network Testing for Swift (without the Flakiness) - Esri Software Engineering Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness","og_locale":"en_US","og_type":"article","og_title":"Meet Dejavu: Deterministic Network Testing for Swift (without the flakiness)","og_description":"If your iOS tests touch the network, you\u2019ve probably felt the pain: they get&nbsp;slow, they get&nbsp;flaky, and they sometimes fail for reasons that have nothing to do with your code. We built&nbsp;Dejavu&nbsp;to make those tests boring\u2014in the best possible way. Dejavu&nbsp;is Esri\u2019s open\u2011source, Swift\u2011native library that&nbsp;records&nbsp;real HTTP requests and&nbsp;replays&nbsp;them later, so your test suite runs [&hellip;]","og_url":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness","og_site_name":"Esri Software Engineering Blog","article_modified_time":"2026-02-26T18:09:26+00:00","og_image":[{"width":1119,"height":417,"url":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness","url":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness","name":"Meet Dejavu: Deterministic Network Testing for Swift (without the flakiness) - Esri Software Engineering Blog","isPartOf":{"@id":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness#primaryimage"},"image":{"@id":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness#primaryimage"},"thumbnailUrl":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong-1024x382.png","datePublished":"2026-02-26T10:46:00+00:00","dateModified":"2026-02-26T18:09:26+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness#primaryimage","url":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong.png","contentUrl":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong.png","width":1119,"height":417},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/articles\/meet-dejavu-deterministic-network-testing-for-swift-without-the-flakiness#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog"},{"@type":"ListItem","position":2,"name":"Meet Dejavu: Deterministic Network Testing for Swift (without the flakiness)"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/#website","url":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/","name":"Esri Software Engineering Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"text_date":"February 26, 2026","author_name":"Harish Kunchala","author_page":false,"custom_image":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/AdobeStock_1228982199.jpg","primary_product":false,"tag_data":[{"term_id":97,"name":"CI","slug":"ci","term_group":0,"term_taxonomy_id":97,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":94,"name":"Dejavu","slug":"dejavu","term_group":0,"term_taxonomy_id":94,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":14,"name":"holistci testing","slug":"holistci-testing","term_group":0,"term_taxonomy_id":14,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":95,"name":"network mocking","slug":"network-mocking","term_group":0,"term_taxonomy_id":95,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":34,"name":"swift","slug":"swift","term_group":0,"term_taxonomy_id":34,"taxonomy":"post_tag","description":"","parent":0,"count":3,"filter":"raw"},{"term_id":96,"name":"XCTest","slug":"xctest","term_group":0,"term_taxonomy_id":96,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"}],"category_data":[{"term_id":17,"name":"Testing &amp; QA","slug":"testing-qa","term_group":0,"term_taxonomy_id":17,"taxonomy":"category","description":"Articles on how we apply software testing, quality assurance, test automation, and defect tracking processes to ensure software quality.","parent":3,"count":3,"filter":"raw"}],"product_data":{"errors":{"invalid_taxonomy":["Invalid taxonomy."]},"error_data":[]},"primary_product_link":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/","short_description":"Esri\u2019s open\u2011source, Swift\u2011native library Dejavu can speed up your iOS testing that touches the network","image":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/app\/uploads\/2026\/02\/dejavu-diagram-horiz-ong826x465.png","_links":{"self":[{"href":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/wp-json\/wp\/v2\/article\/1360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/wp-json\/wp\/v2\/users\/25"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/wp-json\/wp\/v2\/article\/1360\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/wp-json\/wp\/v2\/media?parent=1360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/wp-json\/wp\/v2\/categories?post=1360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/en-us\/software-engineering\/blog\/wp-json\/wp\/v2\/tags?post=1360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}