Uploaded image for project: 'Build'
  1. Build
  2. BUILD-592

Prohibit selenium API usage in functionaltests.* via Maven check

XMLWordPrintable

      A Magnolia ui test writer must not use the selenium WebDriver API directly in the tests, instead (s)he should use Magnolia page objects. This applies for tests for Magnolia 6.1 and newer versions.

      In order to enforce this rule, Maven should check whether test classes comply with this rule and let the build fail in case the rule is violated.

      Packages which must follow the rule:

      in CE
      it.info.magnolia.functionaltests.*

      In dx-core
      it.info.magnolia.functionaltests.*

      Prohibited imports in the classes to be checked

      The most "clear" rule would be to prohibit everything from org.openqa.selenium.*.

      however, page objects sometimes throw org.openqa.selenium.NoSuchElementException, and sometimes we even want to check for this exact exception.
      This said - to install such a "Prohibit selenium API usage", we must introduce our own Magnolia UI exception.

      To be defined / decided

      • Package name of the new functional tests in dx-core
      • The introduction of a new Magnolia test exception to allow a strict rule prohibiting the complete selenium package in test classes.

        Acceptance criteria

              cmeier Christoph Meier
              cmeier Christoph Meier
              Foundation
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoR

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 1.75d
                    1.75d