Uploaded image for project: 'Magnolia Test Framework'
  1. Magnolia Test Framework
  2. MGNLTEST-149

Selenium extension should operate lazy

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • None
    • 1.1.0

      Context

      We now have four jupiter-5 extensions to be used for (new) Magnolia integration tests. Also their responsibilities are well separated.

      Selenium is the extension enabling UI tests. If a test class has been enriched with the Selenium extension, beforeEach(ExtensionContext extensionContext) kicks in and always:

      • creates the webdriver
      • navigates the driver to magnoliaAuthor/.magnolia/admincentral
      • instantiates a VncRecordingHelper

      See details on bitbucket

      So, this happens before every method is executed.
      This is fine, if the test method is a UI test, but for all others tests in the same class it is not required.

      Acceptance criteria

      Selenium sets up webdriver and VncRecordingHelper only if a test method injects PageObjects.

      Use case

      Generic

      @MagnoliaIntegrationTest
      public class ExampleTest {
          
          @Test
          void uiTest(PageObjects expect){ /* */ }
          
          @Test
          void nonUiIntTest(MagnoliaHttpClient client){ /* */}
          
          @Test 
          void foobarTest(PageObjects expect, MagnoliaHttpClient client){ /* */}
      }
      

      Concrete use case:

      info.magnolia.functionaltests.ResourcesFunctionalTests

        Acceptance criteria

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

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1d 7.75h
                  1d 7.75h