Get response code timeout #161

Merged
merged 7 commits into from Feb 4, 2013

Projects

None yet

4 participants

@casschin
Contributor

I updated the get_response_code function so that it returns a timeout
http response. I noticed that http://getmockery.com/, one of the links
on the page, never loads and was causing the test to get stuck because
it can't handle a timeout.

casschin added some commits Jan 20, 2013
@casschin casschin Adds a slew of new tests
This test needed a bit more coverage to test the various link, images,
and email form at the bottom.

I replaced the existing functions to gather links/images with
explicitly declared elements and locators. I think this is probably a
better approach since we want to test against what we expect to be
there, not what is actually on the page.

I added a function that allows you to select options in a select drop
down menu. since it takes a few lines to accomplish that.

I updated the `get_response_code` function so that it returns a timeout
http response. I noticed that http://getmockery.com/, one of the links
on the page, never loads and was causing the test to get stuck because
it can't handle a timeout.
c01d91d
@casschin casschin Sets the timeout in get_response_code to the test-defined timeout 1e3944d
@casschin casschin Restores the original page and test files 787d595
@casschin casschin Removes the select_option function 2041fe2
@casschin casschin Implements @bobsilverberg's recommended changes 9210d55
@teodosia teodosia commented on an outdated diff Jan 22, 2013
tests/test_mozillabased.py
@@ -73,4 +73,4 @@ def test_navbar_links_are_visible(self, mozwebqa):
for link in page.Header.nav_links_list:
if not page.is_element_visible(*link.get('locator')):
bad_links.append('The link at %s is not visible' % link.get('locator')[1:])
- Assert.equal(0, len(bad_links), '%s bad links found: ' % len(bad_links) + ', '.join(bad_links))
+ Assert.equal(0, len(bad_links), '%s bad links found: ' % len(bad_links) + ', '.join(bad_links))
@teodosia
teodosia Jan 22, 2013 Contributor

We have a pep8 issue here: test_mozillabased.py:76:104: W292 no newline at end of file.

@AlinT
Contributor
AlinT commented Jan 28, 2013

The changes look good.
There is 1 single fail: http://pastebin.mozilla.org/2092292

@bobsilverberg
Collaborator

I am seeing that too, @AlinT. :( I guess that one site is configured not to accept HEAD requests. I think we have to revert back to using GET instead of HEAD. Sorry @casschin. If you can make that change I think this pull request will be good to merge. That means that you should also update the other pull request that does the link checking for 50+ links to break them up into groups - maybe divide them into 3 groups and create 3 tests for it. Thanks!

@bobsilverberg
Collaborator

This looks good, @casschin. Merging in!

@bobsilverberg bobsilverberg merged commit bbb784d into mozilla:master Feb 4, 2013
@retornam retornam added a commit that referenced this pull request Feb 4, 2013
@retornam retornam Revert "Merge pull request #161 from casschin/get-response-code-timeout"
This reverts commit bbb784d, reversing
changes made to 14dd4aa.
eaa61ac
@retornam retornam added a commit to retornam/mcom-tests that referenced this pull request Feb 14, 2013
@retornam retornam Revert "Revert "Merge pull request #161 from casschin/get-response-co…
…de-timeout""

This reverts commit eaa61ac.
e28f46b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment