Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-2345

Make template for E2E testing

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None

      Why?

      We want to have some guideline how to write E2E automated tests on templates.

      What?

      Have a automated test running against one of our templates (mobile security template) probably. Have it well documented with internal docs as well as MD file in the repository.

      How?

      Use appium, it was proven to be well working through Appium Java SDK (AGDROID-675). Write a set of base / helper classes that tests will inherit from.

      Use PageObjects as thnolan_jira recommended:
      Page objects are a great way of abstracting the presentation logic and removing it from the test code. Page objects allow us to expose the selectors to other classes from their own class, and also can be used to provide some basic user actions, such as click a button or send text to a text area (call methods from the utility class). as a general rule of thumb, page objects generally don't have assertion logic in our code. He is an example of somebody using page objects in java.
      https://www.pluralsight.com/guides/software-engineering-best-practices/getting-started-with-page-object-pattern-for-your-selenium-tests

      Recommendations by vsazel:
      Use Kotlin and it's DSL capabilities to have tests understandable and without boilerplate. Something like that:

      on applicationScreen {
      
         openNavigationDrawer {
             select(authentication)
         }
      
         on authenticationScreen {  //authenticationScreen is that page object
             click(login)
             on keycloakLoginScreen {
                fill(username,"user1")
                fill(password,"123")
                click(login) //this login would be different from login above, it would be from context of keycloakLoginScreen
             }
         }
      
         on authenticatedScreen {
             //...
         }
      }
      

      and/or use specification framework like Spek

            vsazel Vojtěch Sázel (Inactive)
            vsazel Vojtěch Sázel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 3 days Original Estimate - 3 days
                3d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days, 4 hours
                3d 4h