Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[RFR] Automate test_utilization_utilization_graphs #10194

Merged
merged 1 commit into from
Jul 10, 2020

Conversation

Gauravtalreja1
Copy link
Contributor

@Gauravtalreja1 Gauravtalreja1 commented Jun 16, 2020

Signed-off-by: Gaurav Talreja [email protected]

Purpose or Intent

PRT Run

{{ pytest: cfme/tests/candu/test_utilization.py::test_utilization_trends --long-running }}

@Gauravtalreja1 Gauravtalreja1 changed the title Automate test_utilization_utilization_graphs [WIPTEST] Automate test_utilization_utilization_graphs Jun 16, 2020
Copy link
Contributor

@nachandr nachandr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you help me understand why the candu_db_restore fixture can't be used as is ?
It's being used by other tests. Since you've updated the fixture, all the tests that use the fixture would have to be updated as well.

@Gauravtalreja1
Copy link
Contributor Author

Could you help me understand why the candu_db_restore fixture can't be used as is ? It's being used by other tests. Since you've updated the fixture, all the tests that use the fixture would have to be updated as well.

@nachandr Here in fixture candu_db_restore, there was a hard-coded db file_name, now using getattr() we're getting a file_name from a pytest parameter, passed while running a test, and for other tests, there is no need of update those tests as default file_name will point if we didn't pass any pytest parameter.

@Gauravtalreja1 Gauravtalreja1 force-pushed the utilization-test branch 13 times, most recently from a918c47 to 46df4b7 Compare June 24, 2020 11:52
3. Verify that all graphs shows correctly
"""
view = navigate_to(entity, "UtilTrendSummary")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since entity is set up on the temporary appliance, the test should run navigate_to and the view methods within a with temp_appliance_extended_db context block so that the browser actually points to the temp appliance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it will make more sense, and this will make execution faster, as for every entity it was refreshing a browser for pointing to a temp_appliance again, thanks @tpapaioa :)

@Gauravtalreja1 Gauravtalreja1 force-pushed the utilization-test branch 3 times, most recently from 0e0b308 to 6deca5a Compare June 25, 2020 14:09
Comment on lines 154 to 155


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this fixture to cfme/fixtures/candu.py .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nachandr DONE

assert view.details.disk_chart.is_displayed
assert view.report.disk_table.is_displayed
assert view.report.cpu_table.is_displayed
assert view.report.memory_table.is_displayed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1)Please move this test to a new file in the tests/candu folder.
2)I would add a comment staing that this test automates the testing of the Overview->Utilization tab .
3)I would also rename the test to something like : test_utilization_trend()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nachandr , Done :)

@Gauravtalreja1 Gauravtalreja1 force-pushed the utilization-test branch 2 times, most recently from ff416d8 to 702ce81 Compare July 6, 2020 09:12
@dajoRH
Copy link
Contributor

dajoRH commented Jul 6, 2020

I detected some fixture changes in commit 09b9583

The global fixture candu_db_restore is used in the following files:

  • cfme/tests/candu/test_graph_groupbytag.py
    • test_tagwise
  • cfme/tests/candu/test_utilization.py
    • test_utilization_trends

The global fixture entity_init is used in the following files:

  • cfme/tests/candu/test_utilization.py

Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃

@Gauravtalreja1 Gauravtalreja1 changed the title [WIPTEST] Automate test_utilization_utilization_graphs [RFR] Automate test_utilization_utilization_graphs Jul 7, 2020
@john-dupuy john-dupuy added the test-automation To be applied on PR's which are automating existing manual cases label Jul 9, 2020
@mshriver mshriver merged commit 7209e14 into ManageIQ:master Jul 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
test-automation To be applied on PR's which are automating existing manual cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants