Atlassian Selenium
  1. Atlassian Selenium
  2. SELENIUM-77

Allow TestedProducts to be extended with extra Guice Modules without having to implement your own TestedProduct

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None

      Description

      Need a nice way to be able to extend the modules a TestedProduct uses so plugin devs can write their own modules without haveing to create their own TestedProduct.

        Activity

        Hide
        Dariusz Kordonski added a comment - - edited

        We've had sort of a marginal use case for that in GreenHoppper. The deal is that we defined a custom JUnit4 runner in JIRA that is also useful for some plugins. Part of what it does is injecting stuff from the Guice context maintained by tested product into tests. Furthermore, we have a custom GreenHopper navigation component that wraps around tested product and is used to navigate to common GreenHopper locations. This guy cannot be accessed by the above injection (it could be defined as page object, but then again, we would have to go through page binder to instantiate it and thus it would be not available for injection). This is a really marginal use case though that does not limit us in any significant way.

        Show
        Dariusz Kordonski added a comment - - edited We've had sort of a marginal use case for that in GreenHoppper. The deal is that we defined a custom JUnit4 runner in JIRA that is also useful for some plugins. Part of what it does is injecting stuff from the Guice context maintained by tested product into tests. Furthermore, we have a custom GreenHopper navigation component that wraps around tested product and is used to navigate to common GreenHopper locations. This guy cannot be accessed by the above injection (it could be defined as page object, but then again, we would have to go through page binder to instantiate it and thus it would be not available for injection). This is a really marginal use case though that does not limit us in any significant way.
        Hide
        Dariusz Kordonski added a comment - - edited

        I think this becomes useful in JoD where we have one wrapping product around all other app products. Since they come from various libraries we might want to add/replace injectable stuff in them (e.g. add studio stuff that will be accessible in every product's page binder). When spiking StudioTestedProduct based on product page objects libraries I came across use cases where it would be useful!

        Show
        Dariusz Kordonski added a comment - - edited I think this becomes useful in JoD where we have one wrapping product around all other app products. Since they come from various libraries we might want to add/replace injectable stuff in them (e.g. add studio stuff that will be accessible in every product's page binder). When spiking StudioTestedProduct based on product page objects libraries I came across use cases where it would be useful!
        Hide
        Dariusz Kordonski added a comment -

        Definitely we want StudioTestedProduct to be accessible via injection from every page object!

        Show
        Dariusz Kordonski added a comment - Definitely we want StudioTestedProduct to be accessible via injection from every page object!
        Hide
        Don Brown added a comment -

        Yes, this would be huge. I'd even bump this up to major.

        Show
        Don Brown added a comment - Yes, this would be huge. I'd even bump this up to major.
        Hide
        Ben Buchanan added a comment -

        Now that Jaie has left, Dariusz owns selenium/webdriver.

        Show
        Ben Buchanan added a comment - Now that Jaie has left, Dariusz owns selenium/webdriver.
        Hide
        Jed Wesley-Smith added a comment -

        we have a new use-case for this, which is to inject our own timeouts into performance tests – we have brow-beaten/incentivated/pleaded Dariusz into considering finishing it!

        Show
        Jed Wesley-Smith added a comment - we have a new use-case for this, which is to inject our own timeouts into performance tests – we have brow-beaten/incentivated/pleaded Dariusz into considering finishing it!
        Hide
        Alexander Hennecke added a comment -

        Slight bug in that the Guice injector was replaced instead of appended, created pull request for fix at https://bitbucket.org/atlassian/atlassian-selenium/pull-request/1/selenium-77-fixed-broken-override-was

        Show
        Alexander Hennecke added a comment - Slight bug in that the Guice injector was replaced instead of appended, created pull request for fix at https://bitbucket.org/atlassian/atlassian-selenium/pull-request/1/selenium-77-fixed-broken-override-was
        Hide
        Dariusz Kordonski added a comment -

        thanks Alex, merged already. I'll keep it open to add some more tests.

        Show
        Dariusz Kordonski added a comment - thanks Alex, merged already. I'll keep it open to add some more tests.
        Hide
        Dariusz Kordonski added a comment -

        I didn't have bandwidth for more tests, FWIW it's still marked as experimental so we can always go back and fix anything we need, incl. changing the APIs around

        Show
        Dariusz Kordonski added a comment - I didn't have bandwidth for more tests, FWIW it's still marked as experimental so we can always go back and fix anything we need, incl. changing the APIs around

          People

          • Assignee:
            Dariusz Kordonski
            Reporter:
            jwilson
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 6 hours
              6h
              Remaining:
              Remaining Estimate - 6 hours
              6h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Who's Looking?