Uploaded image for project: 'Community Edition'
  1. Community Edition
  2. MGNLCE-86

UI Test improvements as preparation for using docker and chrome



    • Type: Task
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.7, 5.6
    • Component/s: None
    • Labels:
    • Sprint:
      Basel 106, Basel 107, Basel 108, Basel 109, Basel 110, Basel 111, Basel 112
    • Story Points:
    • Magnolia Release:
      5.5.7, 5.6


      The improvements consist of the following main parts:

      Use FluentWait instead of just assertions (MGNLCE-87)

      Because a lot of the interaction are dynamic, meaning they are done via JavaScript without HTTP Request/Response, Selenium has little knowledge when the DOM is ready for queries, clicks or assertions.
      For those situations we should use FluentWait with our convenience methods waitUntil and assertEventually. There we have the possibility to describe the status we expect to reach, like the status indicator after a publication to turn green, as a condition and the selenium framework evaluates it periodically until met.

      Rely on explicit instead of implicit waits (MGNLCE-89)

      Selenium FluentWaits are considered explicit waits because we declare a condition we are looking for, for a certain amount of time which could be individually configured. Selenium provides another way to wait for elements in the DOM with implicit waits which are used globally. That wait or timeout is used whenever the DOM is queried for an element by the driver.
      Implicit waits do not ideally work in more complex situation because they work when querying the DOM tree and not when waiting for derived attributes like displayed or combinations of conditions. This is why we have FluentWaits.
      Because implicit and explicit timeouts influence each other (see MGNLCE-89 for more details) they should not be used simultaneously.

      Incorrect use of appIsLoaded() condition (MGNLCE-88)

      We used the condition appIsLoaded() as general wait if something is happening condition. This worked ... but only by accident. The condition was implemented incorrect for most situations but instead of failing it turned into a delay(10). Because this is quite expensive in the end we have to use appropriate conditions instead of appIsLoaded()

      Other smaller changes

      There are other small changes ... best have a look at the PR.
      Most notable is probably the use of a correct log4j.xml which directs all log messages during the tests into a log file. JUnit and Selenium messages are still displayed as expected.


          Issue Links



              mmuehlebach Michael Mühlebach
              mmuehlebach Michael Mühlebach
              0 Vote for this issue
              1 Start watching this issue