Project

General

Profile

Bug #1929

Unit tests fail on CI server with Geckodriver 0.18.0

Added by Luke Murphey almost 7 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Unit Tests
Target version:
-
Start date:
07/13/2017
Due date:
% Done:

0%


Subtasks

Bug #1931: Fix issue where FireFox fails to workNewLuke Murphey


Related issues

Related to Website Input - Bug #1930: Improve handling of webdriver failures Closed 07/13/2017

History

#1 Updated by Luke Murphey almost 7 years ago

test.run_unit:
     [exec] Waiting for web-server to start ..............................................................................Web-server could not be started
     [exec] Waiting for web-server to start ..............................................................................Web-server could not be started
     [exec] Waiting for web-server to start ..............................................................................Web-server could not be started
     [exec] Waiting for web-server to start ..............................................................................Web-server could not be started
     [exec] Waiting for web-server to start ..............................................................................Web-server could not be started
     [exec] Waiting for web-server to start ..............................................................................Web-server could not be started
     [exec] sssFssss.s....s...ss...........................sssss........ss.ssssss.............
     [exec] ======================================================================
     [exec] FAIL: test_if_web_server_is_running (__main__.TestBrowserRendering)
     [exec] ----------------------------------------------------------------------
     [exec] Traceback (most recent call last):
     [exec]   File "/var/lib/go-agent/pipelines/web-input/tests/unit_test_web_server.py", line 68, in test_if_web_server_is_running
     [exec]     self.fail("The test web-server is not running; tests that rely on the built-in web-server will fail or be skipped")
     [exec] AssertionError: The test web-server is not running; tests that rely on the built-in web-server will fail or be skipped
     [exec] 
     [exec] ----------------------------------------------------------------------
     [exec] Ran 82 tests in 1812.602s
     [exec] 
     [exec] FAILED (failures=1, skipped=24)

#2 Updated by Luke Murphey almost 7 years ago

  1. Do these work locally?
    1. It passes locally
  2. Do these work when executed manually?
  3. Is the port used?
  4. Does trying another port work?
    1. Tried 40000 instead of 28888
    2. Worked

#3 Updated by Luke Murphey almost 7 years ago

XVfb took the port according to:

sudo netstat -tulpn

#4 Updated by Luke Murphey almost 7 years ago

I think this is happening due to this error:

    [exec] ======================================================================
     [exec] ERROR: test_get_result (__main__.TestBrowserRenderingFirefox)
     [exec] ----------------------------------------------------------------------
     [exec] Traceback (most recent call last):
     [exec]   File "/var/lib/go-agent/pipelines/web-input/tests/unit_test_web_server.py", line 85, in _decorator
     [exec]     return func(self, *args, **kwargs)
     [exec]   File "unit.py", line 697, in test_get_result
     [exec]     content = web_scraper.get_result_browser(url_field.to_python("http://127.0.0.1:" + str(self.web_server_port) + "/html"), browser=self.BROWSER)
     [exec]   File "../src/bin/web_input.py", line 988, in get_result_browser
     [exec]     driver.quit()
     [exec]   File "../src/bin/selenium/webdriver/firefox/webdriver.py", line 181, in quit
     [exec]     RemoteWebDriver.quit(self)
     [exec]   File "../src/bin/selenium/webdriver/remote/webdriver.py", line 551, in quit
     [exec]     self.execute(Command.QUIT)
     [exec]   File "../src/bin/selenium/webdriver/remote/webdriver.py", line 256, in execute
     [exec]     self.error_handler.check_response(response)
     [exec]   File "../src/bin/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
     [exec]     raise exception_class(message, screen, stacktrace)
     [exec] WebDriverException: Message: quit
     [exec]

#5 Updated by Luke Murphey almost 7 years ago

I upgraded the Linux server to the newest version and the driver worked. I wonder if the tests are doing something wrong.

Actually, I can't get it load content though.

#6 Updated by Luke Murphey almost 7 years ago

Seeing this error:

2017-07-14 06:18:21,930 ERROR Exception generated while attempting to get browser rendering or url=https://textcritical.net/read
Traceback (most recent call last):
  File "<string>", line 280, in load_page
TypeError: unbound method get_result_browser() must be called with WebScraper instance as first argument (got ParseResult instance instead)

#7 Updated by Luke Murphey almost 7 years ago

That prior issue is now fixed.

#8 Updated by Luke Murphey almost 7 years ago

  • Subject changed from Unit tests fail on CI server to Unit tests fail on CI server with Geckodriver 0.18.0

#9 Updated by Luke Murphey almost 7 years ago

  • Related to Bug #1930: Improve handling of webdriver failures added

#10 Updated by Luke Murphey almost 7 years ago

  • Target version changed from 4.3.0 to 4.4

Going to revert back to 0.17.0 for now.

#11 Updated by Luke Murphey almost 7 years ago

  • Target version deleted (4.4)

Also available in: Atom PDF