Commit Graph

24 Commits

Author SHA1 Message Date
Jan Jasek 2964a50fd4 Stability improvement of Instance tests
Change-Id: Ia3a0d433002a1703c400c33b5901c3bca08d91bd
2023-04-25 12:58:23 +00:00
Ashish Gupta ed947b453f Unskipping test_floatingip_associate_disassociate test case
Change-Id: I31d73269364fc3a4fa26bf8759852f84ca9b25e0
2023-04-04 02:50:33 +05:30
Jan Jasek b14958df8b Fix instance error with attribute cells.
Selenium read data faster than the data are loaded.
Added wait until element is visible.

Change-Id: I2975ea5836a898d113a2baaab6a8f9bf8af8d742
2022-11-03 11:29:12 +01:00
Akihiro Motoki e5d09edc20 Use python3-style super()
In python3, super() does not always require a class and self reference.
In other words, super() is enough for most cases.
This is much simpler and it is time to switch it to the newer style.

pylint provides a check for this.
Let's enable 'super-with-arguments' check.

NOTE: _prepare_mappings() method of FormRegion in
openstack_dashboard/test/integration_tests/regions/forms.py is refactored.
super() (without explicit class and self referece) does not work when
a subclass method calls a same method in a parent class multiple times.
It looks better to prepare a separate method to provide a common logic.

Change-Id: Id9512a14be9f20dbd5ebd63d446570c7b7c825ff
2020-10-15 14:37:20 +09:00
Pallav Gupta ad41fe5106 Fix instances integration tests
The aim of this PS is to fix existing skipped instances
integration tests listed below:
- TestAdminInstances.test_create_delete_instance
- TestInstances.test_create_delete_instance

This PS also resolves Partial-Bug: #1774697

Change-Id: I9c2385274a2725409f61137ae201d868d24a56b4
2020-05-20 00:20:54 -05:00
panneer.smn 15574cad5c Integration test fixes
* fixed 37 tests in total
* restructured and renamed test modules as per horizon
* fixed page navigation & updated method calls
* fixed css selector and xpaths as per horizon
* Removed decorators.skip for working tests
* included decorators.skip for non - working tests
* updated description for tests as per horizon navigation
* removed *update flavor info* and *update flavor access* test, as feature unavailable on horizon
* updated table column name references in page modules
* updated bind table action names as per horizon
* included help page navigation checkpoint
* fixed rc file download drop down selection
* updated page titles in test modules
* included calls as required for spinner disappearance
* updated form fields as per test needs
* updated default ipv4 and subnet for router interfaces
* included string conversion as required for comparisons
* updated cirros image name in horizon.conf

Change-Id: I9fdc810b37443b616bbb82956d1c90a0fa5ebd6b
2018-06-21 10:59:31 +03:00
Akihiro Motoki b89c1abfa5 Multiple integration test fixes
This patch represents the following patches, combined:

---

integration tests: retry WebDriver instantiation when conn refused
  https://review.openstack.org/#/c/375042/

We see connection refused which leads to integration test failure randomly.
This seems to come from high load of test infra. This commit retries
WebDriver instantiation when connection refused is returned.

There is no confident this workaround works, but it would be great
if this reduces the number of failures. Let's try.

---

integration test: ensure IPv4 address is extracted
  https://review.openstack.org/#/c/374826/

In test_floatingip_associate_disassociate, IPv6 address is passed
to Floating IP associate API. This commit ensures to pick up IPv4
address of an instance.

Change-Id: Iba71d1e17e252527a82cd53c34dca35723367b28
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Partial-Bug: #1626643
Closes-Bug: #1626536
2016-09-23 17:59:48 +09:00
jlopezgu b450a03282 Improved table deletion efficiency
Volumes and instances integration tests deleted and validated entities
one row at a time, now they are able to delete and validate multiple
rows at a time.

Change-Id: I7f8fdc7e0ccefdd0f6d71f9f92c8a2aefeec8d54
Closes-bug: #1585209
2016-06-21 14:03:58 -05:00
Sergei Chipiga 65eb9e9b8c Fix explicit waiting if instance has error status
This patches includes:
- don't wait instance launching if instance in error status
- add missed assertTrue to validate notification messages
- check that message is present and is displayed

Change-Id: If731751fa4deabdeebe373748b169ac7ac617f8c
Closes-Bug: #1569941
2016-04-15 13:21:46 +00:00
Jenkins 15f43c186a Merge "Added test for check launch volume as instance functionality" 2016-04-13 17:09:58 +00:00
Timur Sufiev 0032f3f5c3 Guard against instance row being displayed slowly in i9n tests
Sometimes due to slow Nova response in integration tests an instance
row is being checked for the presence of a specific status before a
row even appears.  Wait not only for the status appearance, but for
the row appearance as well.

Change-Id: Ifc58ef55a1e85c99ed442858c4f51a045603dc62
Closes-Bug: #1568387
2016-04-10 10:42:33 +03:00
Tatyana Kuterina 6bb41cd481 Added test for check launch volume as instance functionality
Tests check that launch as instance actions are executed correctly for volume
under regular user.

Change-Id: I79bd0f75ab88d82d43ee7232ded4157dfd51866e
2016-04-07 15:49:26 +00:00
Timur Sufiev da4e10f0ad Refactor some table rows & cells waits in i9n tests
Abstract away the logic for waiting table row to become deleted and
table cell to change its status common for different integration tests
Page Objects into 2 TableRegion methods.

Change-Id: Ib28708ffe5201f3dc595f842e24eda955ba339fc
2016-03-08 16:27:29 +03:00
Tatyana Kuterina 566a0d2be2 Added test for check associate/disassociate actions for floating ip
Test check that associate/disassociate actions are executed without errors
and floating ip is associated/disassociated with corresponding instance

Change-Id: I6666339eac26207a80ae2a16189a3c4da85a5760
2016-02-24 14:05:31 +03:00
AlexandraAllakhverdieva a2baaf1182 Test for images (create volume/launch instance from image)
Added test_create_volume_from_image()
Added test_launch_instance_from_image()

Implements blueprint: horizon-integration-tests-coverage
Change-Id: Ib127e8516596c0bcf0259f9cc6054d6171a26ee2
2016-02-16 12:02:09 +00:00
Timur Sufiev c573b5b316 Introduce field mappings for FormRegion descendants in i9n tests
This change is similar to the change that introduced decorators for
binding table-level and row-level actions to real table buttons - this
time for forms. Its aim is to provide means to reference a form field
in test using a name different from the one that exists in real
html.

Now it is possible to provide a dictionary for simple FormRegion,
where key is the name to be used in test and the value is used for
binding this name to a real html field widget. Also it is feasible to
provide values other than strings in that dictionary - in this case
they are mean to be a Python class. This Python class will be
initialized as any BaseRegion is usually initialized and then the
value's key will be used for referencing this object. This is useful
when dealing with non-standard widgets in forms (like Membership
widget in Create/Edit Project form or Networks widget in Launch
Instance form).

The old syntax for fields names in tests (the tuple of strings) is
still compatible with new FormRegion-s. It is treated as we had simply
used the same name both for referencing field and for binding it to a
real widget.

Changing TabbedForm region's tabs to be referenced by name instead of
index is out of the scope of this change, but should be done in future.
If not done, we're going to encounter problems with different tabs being
shown or not shown based on RBAC/ enabled settings/ etc.

Implements blueprint: integration-tests-improvements-part1
Change-Id: If3658119176d03dcd0742101ae2922f8e61ba757
2016-01-23 06:47:35 +00:00
Timur Sufiev 726ea9992f Reduce number of calls to Selenium for form fields
Dynamic form fields storage was significantly simplified, removing
most of its 'black magic' part, which included storing properties as
methods and binding new property methods to an existing class instance
at runtime. Now for every form only the fields at current tab (all
fields in case of single-tab form) are being mapped to page regions.

Before the refactoring each form field initialization initiated M
calls to Selenium, where M is the number of possible field widgets/
page region classes. This lead to total number of calls growing as
O(N*M), where N is the number of fields in form. Now the number of
calls grows as O(M+N), thanks to the refactoring of FieldFactory
class.

Implements blueprint: integration-tests-improvements-part1
Change-Id: I3d60041ed8d89b39e3895a90b73d2dec0ff640c5
2016-01-23 06:46:55 +00:00
Timur Sufiev f983cd704e Always wait for spinner to disappear after form submit
Previously every call to .submit() had to be accompanied by
.wait_till_popups_disappear() method. Now tests implicitly wait for
spinner to disappear when invoking .submit() method of a base form
test wrapper.

Implements blueprint: integration-tests-improvements-part1
Change-Id: I986431267eea2321b00a827fe12b511e80b365c6
2016-01-22 12:40:54 +03:00
Timur Sufiev 600986c204 Rework table actions in integration tests
Attach test methods to real table actions (both table-level and
row-level) using @bind_table_action and @bind_row_action
decorators. Using this approach we can also return the next Page
Object from an action method which is most often some form showing
right after the button is pressed.

Thanks to this refactoring integration_tests.regions.tables was HUGELY
simplified and the overall structure of tables is now much clearer.

Implements blueprint: integration-tests-improvements-part1

Change-Id: If7372d4a6acd9450c93ee7cd5dd8eac56060a803
2016-01-22 09:32:13 +00:00
Timur Sufiev 16f925855e In integration tests reference table columns by name
This should protect tests from failing due to columns reordering. To
make name referencing possible, we need to add another 'data-selenium'
attribute to every th.normal-column.

Implements blueprint: integration-tests-improvements-part1

Change-Id: Id788fc288d052c91fc84e94c91ce2a368e8a810a
2016-01-18 21:51:37 +03:00
Timur Sufiev cc1213aa47 Simplify tables page regions
Remove two redundancies: _get_rows() calls in BasicTableRegion
descendants and table_locator property (because it's derivative of
table name which is always specified).

Implements blueprint: integration-tests-improvements-part1

Change-Id: Ic8e4d44beb1ae5f99c096fc796420f2f8306feb0
2016-01-15 16:36:45 +00:00
Akihiro Motoki 5fc26b0a11 Replace "Terminate Instance" with "Delete Instance"
"Delete" is being used almost everywhere in OpenStack Dashboard
except the instance panel. Using "Delete" looks more consistent.
In addition, "Delete" tells non-native English speakers that
deleted instances will be no longer usable again compared to
"Terminate".

DocImpact
Closes-Bug: #1502773
Change-Id: Idccaf3c45566f20f11d02ada64c1d3934a6f3002
2015-11-30 03:55:19 +09:00
Timur Sufiev 3e51652bb1 Fix accidentally broken Instances integration test
It was broken due to changed method name (and the fact we don't yet
have integration test job at gate).

Change-Id: I96ddffd03063f0231876c83a2a1d6aa7bc8e89a3
2015-10-17 03:20:51 -07:00
mavinagi faa6324280 Integration tests - Instances tests
Added instancespage based on the new regions.
test_instances checks the instance createion and deletion.

Few other modifications I've made:
* forms:
- removed "div >" from checkbox locator, to identify "default" checkbox in
  "launch_instance->Access & Security ->default"
*horizon.conf
- Added [launch_instances] to include instances attributes from config file
*config
- Added InstancesGroup to include [launch_instances] from horizon.conf

Partially implements blueprint: integration-tests-hardening

Change-Id: I7d58a970fd36ff86021f3f050c5d01586a26599c
2015-10-17 07:44:09 +00:00