Integration tests - selenium - public/private methods design flaw

Bug #1356774 reported by Tomáš Nováčik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Wishlist
Daniel Korn

Bug Description

There is flaw in horizon integration test design, certain methods located in the pageobject(those methods interact with webelements) should be executed only in the scope of class and definitely not touched in the test case. Problem is that those methods are public and thus nothing suggest that those methods should not be used in a test case(accessed as public method of page). Therefore i suggest to make those methods protected(make them start with the '_' prefix).

List of methods: is_element_visible, fill_field_element, select_dropdown, select_dropdown_by_value

Daniel Korn (dkorn)
Changed in horizon:
assignee: nobody → Daniel Korn (dkorn)
Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

Moving to wishlist as this is not a bug with horizon proper but a recommended improvement of the integration test code to facilitate identifying horizon bugs.

Changed in horizon:
importance: Undecided → Wishlist
Changed in horizon:
status: New → In Progress
Changed in horizon:
assignee: Daniel Korn (dkorn) → Tomáš Nováčik (tnovacik)
Daniel Korn (dkorn)
tags: added: integration-tests
Changed in horizon:
assignee: Tomáš Nováčik (tnovacik) → Daniel Korn (dkorn)
Changed in horizon:
assignee: Daniel Korn (dkorn) → Vlad Okhrimenko (vokhrimenko)
Daniel Korn (dkorn)
Changed in horizon:
assignee: Vlad Okhrimenko (vokhrimenko) → Daniel Korn (dkorn)
Changed in horizon:
assignee: Daniel Korn (dkorn) → Vlad Okhrimenko (vokhrimenko)
Daniel Korn (dkorn)
Changed in horizon:
assignee: Vlad Okhrimenko (vokhrimenko) → Daniel Korn (dkorn)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/112579
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=f573ef714b4574a2fe77ef0f95e323b7c4280e73
Submitter: Jenkins
Branch: master

commit f573ef714b4574a2fe77ef0f95e323b7c4280e73
Author: dkorn <email address hidden>
Date: Thu Aug 7 16:06:18 2014 +0300

    Integration tests - BaseWebObject class

    I added BaseWebObject, a base class for all web element objects,
    i.e. both page objects and regions.
    The new class now contains several wrappers for driver's
    capabilities, which are required not only by the pages but other
    webelements as well, and used to be located within pageobject.
    The necessity arose while discussing the regions patch
    (https://review.openstack.org/#/c/102227/), that will be
    modified accordingly by tnovacik.

    In addition, I've made 6 methods private, as they should
    not be used outside the pages, definitely not by the tests.

    Partially implements blueprint: selenium-integration-testing
    Closes-Bug: #1354017
    Closes-Bug: #1356774

    Change-Id: Id65951160b2016cbdafd8417df48b1b5cd02f99f

Changed in horizon:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → kilo-1
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.