[Toaster] [review request][PATCH]new backend automated tests

Smith, Elliot elliot.smith at intel.com
Thu Sep 3 08:31:48 PDT 2015


On 3 September 2015 at 16:16, Mihail, StanciuX <stanciux.mihail at intel.com>
wrote:

> My tests have nothing to do with what Alex set up in the tts folder.
> They’re fully contained within the toasteruitests subfolder and require
> nothing from outside of it.
> Basically, you need to edit the toaster_test.cfg file to add which tests
> you want to run to the test_cases line and then just do a
> ./run_toastertests.py. No emails necessary.
>

Thanks for letting me know. It might be worth moving your tests up into the
contrib directory in that case, and out of tts.

A README would be useful in your directory, as you have a requirement for
Selenium. Easy enough to work out, but a short intro and dependencies list
would be nice.

I did manage to get the tests to run thanks to your instructions, but got
this error:

#####################
./run_toastertests.py
python -m unittest toaster_automation_test.toaster_cases.test_946
firefox
toaster_automation_test.py - 1594 - 2015-09-03 16:25:24,343
               root - INFO -  CASE 946 log:
Etoaster_automation_test.py - 580 - 2015-09-03 16:25:54,981
               root - INFO -  END: CASE 946 log

======================================================================
ERROR: test_946 (toaster_automation_test.toaster_cases)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "toaster_automation_test.py", line 1597, in test_946
    self.driver.find_element_by_link_text("core-image-minimal").click()
  File
"/home/ell/toaster-run/toaster-env/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 277, in find_element_by_link_text
    return self.find_element(by=By.LINK_TEXT, value=link_text)
  File
"/home/ell/toaster-run/toaster-env/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 707, in find_element
    {'using': by, 'value': value})['value']
  File
"/home/ell/toaster-run/toaster-env/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 196, in execute
    self.error_handler.check_response(response)
  File
"/home/ell/toaster-run/toaster-env/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py",
line 181, in check_response
    raise exception_class(message, screen, stacktrace)
NoSuchElementException: Message: Unable to locate element: {"method":"link
text","selector":"core-image-minimal"}
Stacktrace:
    at FirefoxDriver.prototype.findElementInternal_
(file:///tmp/tmp5WfiOO/extensions/
fxdriver at googlecode.com/components/driver-component.js:10667)
    at fxdriver.Timer.prototype.setTimeout/<.notify
(file:///tmp/tmp5WfiOO/extensions/
fxdriver at googlecode.com/components/driver-component.js:623)

----------------------------------------------------------------------
Ran 1 test in 32.766s

FAILED (errors=1)
#####################

Firefox opened with the expected page, but there's no link with
"core-image-minimal" as its text (reading the stack trace, it looks like
that's what is expected).

Should I raise a bug for this, or am doing something obviously wrong?

Thanks.
Elliot

-- 
Elliot Smith
Software Engineer
Intel Open Source Technology Centre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20150903/77c82f58/attachment.html>


More information about the toaster mailing list