From: Michael Wood <michael.g.wood@intel.com>
To: toaster@yoctoproject.org, Elliot Smith <elliot.smith@intel.com>
Subject: Re: [PATCH 8/9] toaster-tests: fix tests for latest Selenium version
Date: Tue, 7 Jun 2016 11:47:19 +0100 [thread overview]
Message-ID: <5756A637.70608@intel.com> (raw)
In-Reply-To: <4b71309e4aa8dfdfa7a8e4e3723df8ae971f2bed.1465228580.git.ed.bartosh@linux.intel.com>
On 06/06/16 17:01, Ed Bartosh wrote:
> From: Elliot Smith <elliot.smith@intel.com>
>
> Previously, we didn't specify a specific version of Selenium.
> When upgrading to Python 3 and installing Selenium to work with it,
> the JS unit test broke, as the report format produced by Selenium
> had changed.
>
> Modify the test so that it works with the latest Selenium report
> format.
>
> Add a note to the README that the given Selenium version should
> be used to prevent unexpected test failures.
>
> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
> ---
> bitbake/lib/toaster/tests/browser/README | 7 ++++---
> bitbake/lib/toaster/tests/browser/test_js_unit_tests.py | 8 ++++----
> 2 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/bitbake/lib/toaster/tests/browser/README b/bitbake/lib/toaster/tests/browser/README
> index 63e8169..f57154e 100644
> --- a/bitbake/lib/toaster/tests/browser/README
> +++ b/bitbake/lib/toaster/tests/browser/README
> @@ -4,10 +4,11 @@ These tests require Selenium to be installed in your Python environment.
>
> The simplest way to install this is via pip:
>
> - pip install selenium
> + pip install selenium==2.53.2
>
> -Alternatively, if you used pip to install the libraries required by Toaster,
> -selenium will already be installed.
> +Note that if you use other versions of Selenium, some of the tests (such as
> +tests.browser.test_js_unit_tests.TestJsUnitTests) may fail, as these rely on
> +a Selenium test report with a version-specific format.
>
> To run tests against Chrome:
>
> diff --git a/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py b/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
> index e63da8e..3c0b962 100644
> --- a/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
> +++ b/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
> @@ -38,11 +38,11 @@ class TestJsUnitTests(SeleniumTestCase):
> def test_that_js_unit_tests_pass(self):
> url = reverse('js-unit-tests')
> self.get(url)
> - self.wait_until_present('#tests-failed')
> + self.wait_until_present('#qunit-testresult .failed')
>
> - failed = self.find("#tests-failed").text
> - passed = self.find("#tests-passed").text
> - total = self.find("#tests-total").text
If these elements are no longer needed, can you also remove them from
the jsunit test page (static/js/tests/tests.js) thanks
> + failed = self.find("#qunit-testresult .failed").text
> + passed = self.find("#qunit-testresult .passed").text
> + total = self.find("#qunit-testresult .total").text
>
> logger.info("Js unit tests completed %s out of %s passed, %s failed",
> passed,
next prev parent reply other threads:[~2016-06-07 10:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 16:01 [PATCH 0/9] python 3 fixes Ed Bartosh
2016-06-06 16:01 ` [PATCH 1/9] bitbake: toaster: use python3 explicitly Ed Bartosh
2016-06-06 16:01 ` [PATCH 2/9] toaster: replace viewkeys() -> keys() Ed Bartosh
2016-06-06 16:01 ` [PATCH 3/9] toaster: fix migrations Ed Bartosh
2016-06-06 16:01 ` [PATCH 4/9] toaster: decode response content Ed Bartosh
2016-06-06 16:01 ` [PATCH 5/9] toaster: fix incorrect file mode Ed Bartosh
2016-06-06 16:01 ` [PATCH 6/9] toaster: fix test_toaster_tables Ed Bartosh
2016-06-06 16:01 ` [PATCH 7/9] toaster: fix broken reference to urllib Ed Bartosh
2016-06-06 16:01 ` [PATCH 8/9] toaster-tests: fix tests for latest Selenium version Ed Bartosh
2016-06-07 10:47 ` Michael Wood [this message]
2016-06-06 16:01 ` [PATCH 9/9] toaster: open image files in binary mode when sending in response Ed Bartosh
2016-06-07 9:42 ` [PATCH 0/9] python 3 fixes Smith, Elliot
2016-06-07 9:54 ` Smith, Elliot
2016-06-07 13:35 ` Michael Wood
2016-06-07 15:39 ` Smith, Elliot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5756A637.70608@intel.com \
--to=michael.g.wood@intel.com \
--cc=elliot.smith@intel.com \
--cc=toaster@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.