<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/one-pipe-one-user-story-the-case-for-phoenix-test-u7crh42r5" -->

---
title: One Pipe, One User Story: The Case for phoenix_test
description: An Elixir developer shares why phoenix_test made feature tests for his LiveView app LocalCents cleaner than the standard Phoenix testing tools. The library...
canonical: https://daily.dev/posts/one-pipe-one-user-story-the-case-for-phoenix-test-u7crh42r5
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: One Pipe, One User Story: The Case for phoenix_test | daily.dev
og:description: An Elixir developer shares why phoenix_test made feature tests for his LiveView app LocalCents cleaner than the standard Phoenix testing tools. The library...
og:url: https://daily.dev/posts/one-pipe-one-user-story-the-case-for-phoenix-test-u7crh42r5
og:image: https://api.daily.dev/og/posts/U7cRh42r5.png
og:image:alt: One Pipe, One User Story: The Case for phoenix_test
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.

# One Pipe, One User Story: The Case for phoenix_test

**[ElixirStatus](https://daily.dev/sources/elixirstatus)** · 5 min read · 0 upvotes · 0 comments

## Summary

An Elixir developer shares why phoenix_test made feature tests for his LiveView app LocalCents cleaner than the standard Phoenix testing tools. The library lets an entire user interaction chain be expressed as a single pipe, uses human-readable labels instead of DOM IDs, avoids the false confidence of manually built form payloads, and produces much more useful failure output (a focused HTML snippet instead of a full page dump). The post also highlights a bundled Credo check that flags leftover open_browser/1 calls before they hit CI.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://mikezornek.com/posts/2026/9/phoenix-test>

## Questions this post answers

### How does testing a LiveView form with phoenix_test differ from using render_click and render_submit directly?

phoenix_test lets you chain an entire user interaction as one pipe because every step takes the session and returns the session, whereas render_click and render_submit return rendered HTML instead of the view, forcing you to break the pipe and restart from view for each interaction. phoenix_test also uses labels like form field names instead of requiring knowledge of DOM IDs.

_daily.dev surfaces practical comparisons like this for developers deciding between Elixir testing approaches._

### What does an assert_has failure look like in phoenix_test compared to a render(view) assertion in Phoenix LiveViewTest?

An assert_has failure from phoenix_test prints only the focused HTML of the matched selector, such as the contents of an #expenses div, along with the selector and text that failed to match. A render(view) assertion instead dumps the entire page's HTML to the console, making failures much harder to scan.

_Developers debugging noisy LiveView test output can compare frameworks like this on daily.dev._

### What does the PhoenixTest.Credo.NoOpenBrowser check do in the phoenix_test library?

It is a Credo rule shipped with phoenix_test that disallows committing calls to open_browser/1 in test code. The open_browser/1 function is useful during local development to visually inspect a test page, but leaving it in committed tests would open browsers during CI runs and cause unexpected behavior or CI failures.

_Teams tightening CI hygiene for Elixir test suites can track tooling details like this on daily.dev._

## Similar posts on daily.dev

- [Exploring LiveView 1.2](https://daily.dev/posts/exploring-liveview-1-2-p8vjxpn4x) · Elixir Forum · 0 upvotes · 0 comments
- [The Ultimate Showdown: Rails 8 vs Phoenix LiveView](https://daily.dev/posts/the-ultimate-showdown-rails-8-vs-phoenix-liveview-hgdubeoas) · Ruby Flow · 1 upvotes · 0 comments
- [Seeking feedback on my first Phoenix project - a real-time, multiplayer online version of the Scattergories game](https://daily.dev/posts/seeking-feedback-on-my-first-phoenix-project---a-real-time-multiplayer-online-version-of-the-scatte-wufaat9ia) · Awesome Elixir · 0 upvotes · 0 comments
- [SAFE for Elixir: Phoenix LiveView](https://daily.dev/posts/safe-for-elixir-phoenix-liveview-1s84utcbf) · Erlang Solutions · 3 upvotes · 0 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#elixir](https://daily.dev/tags/elixir), [#liveview](https://daily.dev/tags/liveview)

[View this post on daily.dev](https://daily.dev/posts/one-pipe-one-user-story-the-case-for-phoenix-test-u7crh42r5)

```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":"One Pipe, One User Story: The Case for phoenix_test","url":"https://daily.dev/posts/one-pipe-one-user-story-the-case-for-phoenix-test-u7crh42r5","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/one-pipe-one-user-story-the-case-for-phoenix-test-u7crh42r5"},"datePublished":"2026-09-03T17:27:46.380Z","dateModified":"2026-09-03T19:19:19.654Z","description":"An Elixir developer shares why phoenix_test made feature tests for his LiveView app LocalCents cleaner than the standard Phoenix testing tools. The library...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/43c233c34acbabbecb9ede44c16a95c6?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/43c233c34acbabbecb9ede44c16a95c6?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"ElixirStatus","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":"ElixirStatus","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/22e4640538124187827caf8cc8e39190","url":"https://daily.dev/sources/elixirstatus"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/one-pipe-one-user-story-the-case-for-phoenix-test-u7crh42r5","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"testing,elixir,liveview","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ElixirStatus","item":"https://daily.dev/sources/elixirstatus"},{"@type":"ListItem","position":3,"name":"One Pipe, One User Story: The Case for phoenix_test"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/one-pipe-one-user-story-the-case-for-phoenix-test-u7crh42r5#faq","mainEntity":[{"@type":"Question","name":"How does testing a LiveView form with phoenix_test differ from using render_click and render_submit directly?","acceptedAnswer":{"@type":"Answer","text":"phoenix_test lets you chain an entire user interaction as one pipe because every step takes the session and returns the session, whereas render_click and render_submit return rendered HTML instead of the view, forcing you to break the pipe and restart from view for each interaction. phoenix_test also uses labels like form field names instead of requiring knowledge of DOM IDs. daily.dev surfaces practical comparisons like this for developers deciding between Elixir testing approaches."}},{"@type":"Question","name":"What does an assert_has failure look like in phoenix_test compared to a render(view) assertion in Phoenix LiveViewTest?","acceptedAnswer":{"@type":"Answer","text":"An assert_has failure from phoenix_test prints only the focused HTML of the matched selector, such as the contents of an #expenses div, along with the selector and text that failed to match. A render(view) assertion instead dumps the entire page's HTML to the console, making failures much harder to scan. Developers debugging noisy LiveView test output can compare frameworks like this on daily.dev."}},{"@type":"Question","name":"What does the PhoenixTest.Credo.NoOpenBrowser check do in the phoenix_test library?","acceptedAnswer":{"@type":"Answer","text":"It is a Credo rule shipped with phoenix_test that disallows committing calls to open_browser/1 in test code. The open_browser/1 function is useful during local development to visually inspect a test page, but leaving it in committed tests would open browsers during CI runs and cause unexpected behavior or CI failures. Teams tightening CI hygiene for Elixir test suites can track tooling details like this on daily.dev."}}]}
```

