GNOME Bugzilla – Bug 733987
Adding tests for gnome-weather
Last modified: 2021-07-05 10:59:27 UTC
Weather does not have tests as of now. Adding the patch with dogtail+behave tests.
Created attachment 282079 [details] [review] Tests for weather
Review of attachment 282079 [details] [review]: Depreciated patch
Created attachment 282083 [details] [review] Updated Patch for installed weather tests
Review of attachment 282083 [details] [review]: ::: Makefile.am @@ +51,3 @@ +@BEHAVE_INSTALLED_TESTS_RULE@ +INSTALLED_TESTS=add_new_cities remove_cities back_to_world_weather select_all_cities escape_win_select The last test here is tagged "escape_win_selection" in the feature ::: tests/smoketest.feature @@ +27,3 @@ + + @select_all_cities + Scenario: Back to world weather Looks like the name from previous test stayed here and in the next test too
Created attachment 282084 [details] [review] Adding installed tests for gnome-weather
(In reply to comment #4) > Review of attachment 282083 [details] [review]: > > ::: Makefile.am > @@ +51,3 @@ > > +@BEHAVE_INSTALLED_TESTS_RULE@ > +INSTALLED_TESTS=add_new_cities remove_cities back_to_world_weather > select_all_cities escape_win_select > > The last test here is tagged "escape_win_selection" in the feature > > ::: tests/smoketest.feature > @@ +27,3 @@ > + > + @select_all_cities > + Scenario: Back to world weather > > Looks like the name from previous test stayed here and in the next test too Fixed in the updated patch
Review of attachment 282084 [details] [review]: As I mentioned to Shivani in person, gnome-weather is undergoing a UI redesign for 3.14. Nevertheless, I believe the testing harness is quite useful in itself (so I can write the tests for the new UI), so I'm interested in merging it. Some comments: - You're including a patch file in the patch - There are a couple of mentions of Evince in basic-ui-testing.feature - I'd like to have the common steps broken out into a submodule that is shared by all gnome apps that are using this infrastructure, or put into a shared module with a configure check (gnome-common maybe? gnome-tests-common?) - The test harness should refer to org.gnome.Weather.Application, not gnome-weather, because that's the application name - The test harness, like the old one, should use DBus activation when installed, and manual launching from ./src when uninstalled (ie, make check) - The test harness should not concern itself with test environment cleanups, like gnome-initial-setup - that's for gnome-continous to care about (and I like the idea of running tests in a regular session because I want to test as I write the code) - The test harness should save settings at the beginning and restore them at the end, because I don't like all my preferences suddenly gone because I run make check (or make distcheck)
Created attachment 283740 [details] [review] Tests for gnome-weather Editing the patch file inclusion and evince mentions. We can decouple the modules in time along with extending the suggests you have for the harness. Updating this to make sure the tests for weather work as of now.
Review of attachment 283740 [details] [review]: Looks good, though I haven't tested it yet on my local Continuous instance. Several nitpicks: ::: tests/behave_common_steps.py @@ +312,3 @@ + pass + +def cleanup(): We don't need that - this is for Evolution only, safe to remove it @@ +334,3 @@ + system("gsettings set org.gnome.evolution.mail prompt-check-if-default-mailer false") + +def check_for_errors(context): ditto ::: tests/environment.py @@ +25,3 @@ + + # Kill initial setup + os.system("killall /usr/libexec/gnome-initial-setup") Continuous doesn't start it anymore - safe to remove it, as Giovanni mentioned @@ +76,3 @@ + # Attach journalctl logs + if hasattr(context, "embed"): + os.system("sudo journalctl /usr/bin/gnome-session --no-pager -o cat --since='%s'> /tmp/journal-session.log" % context.log_start_time) This should also be removed - Continuous doesn't have 'sudo' and stores journal separately
Created attachment 283761 [details] [review] Tests for gnome-weather Updated Patch with the fixes
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-weather/-/issues/ Thank you for your understanding and your help.