You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Jan Høydahl (Jira)" <ji...@apache.org> on 2026/08/21 17:08:00 UTC
[jira] [Resolved] (SOLR-8474) Test Framework for functional testing Angular UI
[ https://issues.apache.org/jira/browse/SOLR-8474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Høydahl resolved SOLR-8474.
-------------------------------
Fix Version/s: 10.1
Resolution: Fixed
Thanks for great reviews
> Test Framework for functional testing Angular UI
> ------------------------------------------------
>
> Key: SOLR-8474
> URL: https://issues.apache.org/jira/browse/SOLR-8474
> Project: Solr
> Issue Type: Improvement
> Components: Admin UI
> Affects Versions: 5.4
> Reporter: Upayavira
> Assignee: Jan Høydahl
> Priority: Major
> Labels: pull-request-available
> Fix For: 10.1
>
> Attachments: SOLR-8474.zip
>
> Time Spent: 6.5h
> Remaining Estimate: 0h
>
> This issue originally (back in 2015!) proposed introducing Karma and friends to unit-test the then-new AngularJS Admin UI JavaScript. That never materialized, and the issue is now re-purposed for the approach we ended up with a decade later.
> h3. Chosen approach
> Instead of a JavaScript unit-test toolchain, we test the Admin UI end-to-end in a *real browser* against a {*}real Solr{*}, wrapped into Solr's existing JUnit test framework:
> * [Selenium WebDriver|https://www.selenium.dev/] drives a headless Chrome — pure JVM dependencies from Maven Central, no Node.js toolchain. Tests skip cleanly on machines without a Chrome/Chromium binary (e.g. ASF Jenkins).
> * A new opt-in {{JettyConfig.Builder#enableAdminUi()}} makes {{JettySolrRunner}} / {{MiniSolrCloudCluster}} serve the Admin UI exactly like the production {{web.xml}} does.
> * Tests live in {{{}solr/webapp/src/test{}}}, grouped per screen/feature, and cover both display (asserted against live admin API responses, never hardcoded values) and write actions: create/delete collections, aliases and replicas, index documents, edit the schema, change log levels, manage users/roles/permissions with BasicAuth, core admin add/rename/swap/unload and leader/follower replication on standalone nodes, streaming expressions, SQL, and more.
> * The test catalog, deliberately skipped areas, and a list of possible UI bugs surfaced by the tests are tracked in {{{}dev-docs/admin-ui-tests.md{}}}.
> PR: [GitHub PR #4738|https://github.com/apache/solr/pull/4738]
> h3. Closing remarks
> They say the best time to add UI tests was ten years ago; the second best time is now, right before axing it 😜. A big shoutout to [~upayavira] for standing up the then-revolutionary UI back in 2015 — I don1t know if you read this, but who would have thought this code would live this long. It has for sure served us well all these years!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org