[Webkit-unassigned] [Bug 180145] WebDriver: add support for importing and running selenium tests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 30 16:12:57 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=180145

--- Comment #5 from Brian Burg <bburg at apple.com> ---
Comment on attachment 327960
  --> https://bugs.webkit.org/attachment.cgi?id=327960
Updated patch

View in context: https://bugs.webkit.org/attachment.cgi?id=327960&action=review

> Tools/Scripts/import-webdriver-tests:91
> +if '--w3c' in sys.argv or len(sys.argv) == 1:

It seems likely that we may want other CLI options in the future. Can you make this use argparse/optparse?

> Tools/Scripts/webkitpy/webdriver_tests/webdriver_driver.py:46
> +    def selenium_name(self):

Please add a comment to explain the purpose of this. It appears to be used as the name to parameterize the test suite using pytest.

> Tools/Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py:45
>  

Does WPE not need to run Selenium tests? Otherwise it needs a selenium name, I believe.

> Tools/Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:32
> +w3c_tools_dir = WebKitFinder(FileSystem()).path_from_webkit_base('WebDriverTests', 'imported', 'w3c', 'tools')

Would it make more sense to auto-install pytest rather than depending on the W3C drop? Or are the w3C tools dependent on their particular copy of pytest?

> Tools/Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:96
> +                pytest.main(['--driver=%s' % self._name,

Per above, this could be None.

> WebDriverTests/imported/selenium/common/src/web/Page.aspx:1
> +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Page.aspx.cs" Inherits="Page" %>

No reason to import this, as we don't run an ASP server =)

> WebDriverTests/imported/selenium/common/src/web/Page.aspx.cs:3
> +

Ditto but for .Net

> WebDriverTests/imported/selenium/common/src/web/Redirect.aspx:6
> +<head runat="server">

Ditto

> WebDriverTests/imported/selenium/common/src/web/Redirect.aspx.cs:4
> +{

Ditto

> WebDriverTests/imported/selenium/common/src/web/Settings.StyleCop:3
> +    <Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.DocumentationRules">

Ditto

> WebDriverTests/imported/selenium/py/conftest.py:113
> +            browser_path = os.environ.get('WD_BROWSER_PATH')

The more elegant way to achieve this is to take the arguments via pytest_addoption. Let me know if you want to go that route; I recently changed safaridriver's test harness to stop using ENV like this. I think these options are generic enough that other drivers could use them.

> WebDriverTests/imported/selenium/py/conftest.py:169
> +    _path = '../buck-out/gen/java/server/src/org/openqa/grid/selenium/selenium.jar'

I hope none of the python tests use the server fixture. This hasn't been a problem in my experience.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171201/fe9d91ae/attachment-0001.html>


More information about the webkit-unassigned mailing list