Skip to main content
View as Markdown

End-to-end browser testing

End-to-end tests drive the application the way a user does: log in, open a window, enter data, complete a document. iDempiere has no automated end-to-end suite in core today. This page explains what was tried, what is left in the code and what is planned. Applies to all iDempiere versions.

Current state​

  • No Selenium, ZATS or Playwright tests in core.
  • UI flows are tested by hand. See Manual testing.
  • A Playwright suite is proposed in IDEMPIERE-7119 (open).

What was tried before​

YearToolWhat happened
2012SeleniumSelenium integration for the ZK client (IDEMPIERE-92)
2012FitNesseAcceptance tests written as wiki tables (IDEMPIERE-206). See FitNesse integration
2013JMeterLoad tests of the ZK client (IDEMPIERE-876)
2019FitNesse and Selenium moved out of core into separate repositories (IDEMPIERE-4138)

Few tests were written with these tools, and they were not kept up to date.

Fixed component identifiers in ZK​

ZK generates random component IDs, which makes browser tests fragile. Core still has the hook that the Selenium work used.

How it works​

org.adempiere.ui.zk/WEB-INF/zk-selenium.xml sets org.adempiere.webui.AdempiereIdGenerator as the ZK ID generator.

Turn it on​

Add this VM argument to the server launch configuration:

-Dorg.zkoss.zk.config.path=file://${project_loc:org.adempiere.ui.zk}/WEB-INF/zk-selenium.xml
warning

Use it only on a development or test server, never in production.

Planned browser test suite​

IDEMPIERE-7119 proposes a test suite with Playwright.

  • Goal: turn the manual test cases from Testing Days into Playwright tests that run automatically.
  • Element lookup: the ticket mentions a test server with fixed ZK IDs. A later comment reports that Playwright can find elements through the field labels of the Application Dictionary, without fixed IDs.
  • How to help: comment on the ticket before you start, so the work is not duplicated.

Tips for browser tests on iDempiere​

These apply to any browser tool, Playwright or Selenium.

Data​

  • Run against a fresh Garden World database that is reset before each run.
  • Browser tests commit data. They cannot roll back like AbstractTestCase.

Finding elements​

  • Find elements by visible label or role, not by generated ZK IDs.

Waiting​

  • ZK updates the page through AJAX. Wait for a visible result (a status message, a field value), not for a fixed time.

Scope​

  • Keep browser tests for flows that only the UI can show.
  • Test business logic with JUnit tests in org.idempiere.test, which are faster and more stable.

Next​

Testing history