germsvel/phoenix_test
60.8
Adequate · 18 September 2026
3.4k
lines of production code
Elixir
primary language
1
measurement over time
What this system is
PhoenixTest is an Elixir library that provides a unified DSL for writing feature tests across both static Phoenix controllers and LiveView pages. It abstracts the underlying testing mechanisms to allow users to interact with the application through a consistent interface for actions like visiting pages, clicking buttons, and filling in forms. The system includes internal modules for parsing HTML elements and managing form data, along with tooling such as Credo checks and performance benchmarks to support development and CI workflows.
Features
Added automation scripts for changelog generation and package publishing
Two new executable scripts have been added to the \bin\ directory to streamline release workflows. The \bin/create\_changelog\ script automatically generates a changelog by aggregating commit messages and links between the last release tag and the current HEAD, prepending them to the existing \CHANGELOG.md\. The \bin/publish\ script automates the version bumping process by updating version strings in \lib/phoenix\_test.ex\ and \mix.exs\, followed by committing the changes, creating a git tag, pushing to the remote, and publishing the package via \mix hex.publish\.
bin · high confidence
Added performance benchmarks for assertion helpers
Added a new \bench/\ directory containing performance benchmarks for the library's assertion helpers (such as \assert\_has\) and LiveView testing utilities. This allows users to measure and compare the execution speed of these testing functions against standard LiveView assertions using the Benchee library.
bench · high confidence
Credo check to prevent open\_browser usage in tests
A new Credo check, PhoenixTest.Credo.NoOpenBrowser, has been added to the library. This check scans test code for calls to \open\_browser/1\ (including \PhoenixTest.open\_browser/1\) and flags them as warnings. This helps prevent accidental browser launches during CI runs, which can cause unexpected behavior or failures, by ensuring this development-only helper is not committed to test files.
_lib/phoenix\test/credo · high confidence
Initial release of PhoenixTest feature testing library
This change introduces PhoenixTest, a new library for writing feature tests that work seamlessly across both static Phoenix pages and LiveView pages. The \lib/phoenix\_test.ex\ file establishes the core API, including helpers like \visit/2\, \click\_link/2\, \click\_button/2\, \fill\_in/3\, and \assert\_has/2\, allowing users to write tests from a user's perspective without worrying about the underlying page type. The module also includes comprehensive documentation on setup, configuration, and usage examples.
lib · high confidence
Introduce PhoenixTest DSL with Live and Static session drivers
This change introduces the core PhoenixTest API, providing a unified DSL for testing both LiveView and static Phoenix controllers. It adds new session structs (\PhoenixTest.Live\ and \PhoenixTest.Static\) that wrap \Phoenix.ConnTest\ and \Phoenix.LiveViewTest\ to offer a consistent interface for actions like \visit/2\, \click\_button/2\, \fill\_in/3\, and \assert\_has/2\. The library implements a \Driver\ protocol to abstract these interactions, allowing tests to assert on rendered HTML, handle form submissions, and manage navigation across both Live and static contexts without needing to switch testing macros.
_lib/phoenix\test · high confidence
Repository initialization and tooling setup
This change establishes the project's foundational configuration and documentation. It introduces \.tool-versions\ to specify Erlang 27.0 and Elixir 1.19.5, updates \.formatter.exs\ to include the Styler plugin and Phoenix LiveView HTML formatter, and adds \.git-blame-ignore-revs\ to ignore formatting commits. Additionally, it replaces the placeholder README with comprehensive documentation, adds a \LICENSE.md\ file, and creates \upgrade\_guides.md\ to assist users with migration paths.
(repo-wide) · high confidence
Architecture
Refactored element handling into dedicated modules under PhoenixTest.Element
The internal implementation for interacting with HTML elements has been reorganized into specific modules (Button, Field, Form, Link, Select) within the PhoenixTest.Element namespace. This change replaces the previous monolithic or less-structured approach with distinct structs and functions for each element type, improving code maintainability and clarity for internal operations such as form data collection, button submission logic, and link selection. Users interacting with the public API will not see behavioral changes, but the underlying structure is now more modular.
_lib/phoenix\test/element · high confidence
Behavioural changes
Introduce environment-specific configuration for Phoenix endpoints and esbuild
The library now uses a structured configuration approach with a base \config.exs\ that delegates to environment-specific files. In development (\config/dev.exs\), the endpoint is set to \PhoenixTest.Endpoint\. In the test environment (\config/test.exs\), configurations are provided for \PhoenixTest.WebApp.Endpoint\ (port 4000) and \PhoenixTest.AnotherWebApp.Endpoint\ (port 4001), including necessary settings like secret keys and PubSub servers. Additionally, the test configuration now includes setup for esbuild (version 0.17.11) to handle JavaScript bundling during tests, and logger level is set to error.
config · high confidence
Test coverage
Added realistic test support application for LiveView scenarios; Added tests for Credo linting, deprecation warnings, and endpoint configuration; Added unit tests for element parsing and form data extraction; Comprehensive test suite for PhoenixTest core components.
Dependencies
PhoenixTest 0.12.1 dependency overhaul and project setup
This release updates the project to version 0.12.1 and significantly expands the dependency list to support testing and documentation tooling. Key additions include \lazy\_html\ (replacing \floki\ for HTML parsing), \phoenix\_live\_view \~\> 1.0\, \phoenix\_html \~\> 4.1\, and \phoenix \~\> 1.7.10\ (with the lockfile showing an upgrade to Phoenix 1.8.1). Development and test dependencies now include \ex\_doc\, \credo\, \styler\, \benchee\, \esbuild\, \ex\_crap\, and \phoenix\_ecto\. The Elixir requirement is relaxed to \\~\> 1.15\, and the project configuration adds aliases for asset setup/build, test coverage reporting, and benchmarking, along with documentation extras for upgrade guides.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 61.
Lenses
- Code Health 99
- Architecture 99
- Maturity 38
- Readiness 68
- Security 89
Changes since last survey
- 300 commits — 254 feature/other, 46 fixes
By area
- lib/phoenix_test — 174 commits
- (root) — 50 commits
- test/phoenix_test — 45 commits
- test/support — 14 commits
- lib/phoenix_test.ex — 10 commits
- .github/workflows — 3 commits
- bin/create_changelog — 1 commit
- bin/publish — 1 commit
- config/dev.exs — 1 commit
- config/test.exs — 1 commit
Notable commits
- fix: Check local path's endpoint at runtime to fix warning
- fix: Fix 2 tests that broke in squash/rebase
- fix: Fix Form.find_by_descendant! to find with field
- fix: Fix assert_path/refute_path to handle live patching (#69)
- fix: Fix uncheck for checkboxes with array name (#306)
- fix: Fix active_form polluting other fill_forms in Live
- fix: Fix assert_has/refute_has title matching exactly (#65)
- fix: Fix checked checkbox being overridden by hidden input (#68)
- fix: Fix doc links to commits
- fix: Fix double scoping of links (#323)
- fix: Fix fill_in, etc. polluting across different forms
- fix: Fix fill_in/4 doc example
- fix: Fix open_browser/1 example (#92)
- fix: Fix phx-trigger-action handling for dynamically rendered forms (#235)
- fix: Fix uncheck/2 in nested forms (#78)
- fix: Fix: Consider nested text in labels (#250)
- fix: Fix: Deep merge nested form button value (static) (#75)
- fix: Fix: Do not override internal ref when watching view
- fix: Fix: Don't error on input without name attribute (#123)
- fix: Fix: Don't fail form disabled select (#159)
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
germsvel/phoenix_test was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit d8803c6f9d9532a22a75e4c4b90a9a6220a1e321 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.