After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733987 - Adding tests for gnome-weather
Adding tests for gnome-weather
Status: RESOLVED OBSOLETE
Product: gnome-weather
Classification: Applications
Component: build
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Weather Maintainer(s)
GNOME Weather Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-07-30 15:07 UTC by Shivani Poddar
Modified: 2021-07-05 10:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Tests for weather (38.08 KB, patch)
2014-07-30 15:08 UTC, Shivani Poddar
rejected Details | Review
Updated Patch for installed weather tests (105.73 KB, patch)
2014-07-30 15:29 UTC, Shivani Poddar
none Details | Review
Adding installed tests for gnome-weather (105.73 KB, patch)
2014-07-30 15:42 UTC, Shivani Poddar
needs-work Details | Review
Tests for gnome-weather (37.05 KB, patch)
2014-08-18 14:01 UTC, Shivani Poddar
needs-work Details | Review
Tests for gnome-weather (34.70 KB, patch)
2014-08-18 14:42 UTC, Shivani Poddar
none Details | Review

Description Shivani Poddar 2014-07-30 15:07:42 UTC
Weather does not have tests as of now.
Adding the patch with dogtail+behave tests.
Comment 1 Shivani Poddar 2014-07-30 15:08:12 UTC
Created attachment 282079 [details] [review]
Tests for weather
Comment 2 Shivani Poddar 2014-07-30 15:29:13 UTC
Review of attachment 282079 [details] [review]:

Depreciated patch
Comment 3 Shivani Poddar 2014-07-30 15:29:51 UTC
Created attachment 282083 [details] [review]
Updated Patch for installed weather tests
Comment 4 Vitezslav Humpa 2014-07-30 15:38:21 UTC
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
Comment 5 Shivani Poddar 2014-07-30 15:42:31 UTC
Created attachment 282084 [details] [review]
Adding installed tests for gnome-weather
Comment 6 Shivani Poddar 2014-07-30 15:42:51 UTC
(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
Comment 7 Giovanni Campagna 2014-07-30 16:40:10 UTC
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)
Comment 8 Shivani Poddar 2014-08-18 14:01:34 UTC
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.
Comment 9 Vadim Rutkovsky 2014-08-18 14:14:02 UTC
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
Comment 10 Shivani Poddar 2014-08-18 14:42:56 UTC
Created attachment 283761 [details] [review]
Tests for gnome-weather

Updated Patch with the fixes
Comment 11 GNOME Infrastructure Team 2021-07-05 10:59:27 UTC
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.