Merge lp:~dpniel/ubuntu-autopilot-tests/firefox_combined into lp:ubuntu-autopilot-tests

Proposed by Dan Chapman 
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 56
Merged at revision: 56
Proposed branch: lp:~dpniel/ubuntu-autopilot-tests/firefox_combined
Merge into: lp:ubuntu-autopilot-tests
Diff against target: 74 lines (+28/-26)
1 file modified
ubuntu_autopilot_tests/firefox/test_firefox.py (+28/-26)
To merge this branch: bzr merge lp:~dpniel/ubuntu-autopilot-tests/firefox_combined
Reviewer Review Type Date Requested Status
Nicholas Skaggs (community) Approve
Review via email: mp+175259@code.launchpad.net

Description of the change

I have combined the three current tests into one combined tests. If you view
the video here:

https://jenkins.qa.ubuntu.com/job/autopilot-ubuntu-applications/17/label=autopilot-ati/artifact/results/autopilot/videos/

You can see that the firefox process is not termianting quick enough between
one tests teardown and the next tests setup. It can take up to 10 seconds or so
for FF to terminate fully. So combining it into one tests wipes this out.

Let me know what you think, hopefully this will have to be the last edit :-)

Dan

To post a comment you must log in.
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

:-) I agree I hope this is the last edit.. Lesson learned for including non-introspectable apps into the production branch.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu_autopilot_tests/firefox/test_firefox.py'
2--- ubuntu_autopilot_tests/firefox/test_firefox.py 2013-07-15 16:11:32 +0000
3+++ ubuntu_autopilot_tests/firefox/test_firefox.py 2013-07-17 11:50:41 +0000
4@@ -20,38 +20,13 @@
5 self.app.set_focus()
6 self.assertTrue(self.app.is_focused)
7
8- def test_browse_jenkins(self):
9+ def test_firefox_works(self):
10 #Test-case name: firefox/fir-001
11 #This test will check that Firefox can display webpages
12
13 #check that page title loaded jenkins
14 self.assertThat(lambda: self.app.name, Eventually(Contains("Jenkins"), timeout=30))
15-
16- def test_google_search_suggestions(self):
17- #Test-case name: firefox/fir-002
18- #This test will check that Firefox can display search suggestions
19-
20- #open search box, switch to google
21- self.keyboard.press_and_release("Ctrl+k")
22- self.keyboard.press_and_release("F4")
23- self.keyboard.press_and_release("g")
24-
25- #search for ubuntu server docs
26- self.keyboard.type("ubuntu server docs")
27-
28- #ensure we have a generated list of suggestions
29- #WE CAN'T DO THIS :-(
30-
31- #go to results page
32- self.keyboard.type("\n")
33-
34- #check results by looking at page title
35- self.assertThat(lambda: self.app.name, Eventually(Contains("Google")))
36
37- self.assertThat(lambda: self.app.name, Eventually(Contains("server docs")))
38-
39-
40- def test_tabs_and_windows(self):
41 #This test will check that Firefox can create tabs and windows
42 self.assertThat(lambda: self.app.name,
43 Eventually(Contains("Jenkins"), timeout=30))
44@@ -92,3 +67,30 @@
45 #check we have gone back to one window
46 self.assertThat(lambda: len(self.manager.get_open_windows_by_application("Firefox")),
47 Eventually(Equals(originalWindowCount)))
48+
49+
50+ #Test-case name: firefox/fir-002
51+ #This test will check that Firefox can display search suggestions
52+
53+ #open search box, switch to google
54+ self.keyboard.press_and_release("Ctrl+k")
55+ self.keyboard.press_and_release("F4")
56+ self.keyboard.press_and_release("g")
57+
58+ #search for ubuntu server docs
59+ self.keyboard.type("ubuntu server docs")
60+
61+ #ensure we have a generated list of suggestions
62+ #WE CAN'T DO THIS :-(
63+
64+ #go to results page
65+ self.keyboard.type("\n")
66+
67+ #check results by looking at page title
68+ self.assertThat(lambda: self.app.name, Eventually(Contains("Google")))
69+
70+ self.assertThat(lambda: self.app.name, Eventually(Contains("server docs")))
71+
72+
73+
74+

Subscribers

People subscribed via source and target branches