<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>13930</bug_id>
          
          <creation_ts>2020-06-03 17:16:43 +0000</creation_ts>
          <short_desc>Port the CROPS toaster-container selenium tests to the Autobuilder</short_desc>
          <delta_ts>2026-04-30 15:22:10 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>5</classification_id>
          <classification>Infrastructure</classification>
          <product>AutoBuilder</product>
          <component>autobuilder</component>
          <version>3.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Orling">tim.orling</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>david.reyna</cc>
    
    <cc>infras.ab.watcher</cc>
    
    <cc>Infras.watcher</cc>
    
    <cc>pidge</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87398</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2020-06-03 17:16:43 +0000</bug_when>
    <thetext>The CROPS toaster-container runs selenium tests to actually start a build in the browser. Port these tests to the Autobuilder so that we have some coverage for Toaster.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87420</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2020-06-04 09:12:15 +0000</bug_when>
    <thetext>Current work-in-progress on getting the CROPS toaster-container fully functional and passing all tests (also updating to more modern Selenium for web GUI tests):
https://github.com/moto-timo/toaster-container/tree/timo/wip-build-fixes

The CROPS toaster-container uses a selenium docker container to perform tests.
https://hub.docker.com/r/selenium/standalone-firefox

The tests/runtests.sh script installs the selenium python module and then launches the toaster-container and the selenium container and then calls tests/smoketests.py with appropriate parameters.

For Buildbot, we probably don&apos;t want to require running selenium in a docker container. The following blog gives some hints:
https://hristos.lol/selenium-testing-django-application-locally-and-ci/

We may also need to modify the tests/smoketests.py script for the Autobuilder/Buildbot environment.

Perhaps the tests could be integrated into oe-selftest/oeqa, but if so the system requirements for functional Selenium (including chromedriver and/or geckodriver) would need to be tested for presence and if missing other test steps would be skipped.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87421</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2020-06-04 09:34:42 +0000</bug_when>
    <thetext>Also interesting is the Selenium IDE:
&quot;If you want to create quick bug reproduction scripts, create scripts to aid in automation-aided exploratory testing, then you want to use Selenium IDE; a Chrome and Firefox add-on that will do simple record-and-playback of interactions with the browser.&quot;

Which sounds like we could &quot;easily&quot; create new test cases to test more aspects of Toaster. Or suggest to users so they can give us reproducers for bugs.

https://www.selenium.dev/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92950</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2022-04-07 16:41:55 +0000</bug_when>
    <thetext>For the CROPS toaster-container, the tests are run with a selenium container. This simplifies setting up Selenium on the host. The tests are very basic and only run on Firefox currently.
https://github.com/crops/toaster-container/tree/master/tests

These tests do catch regressions and they are run weekly on GitHub Actions.
https://github.com/crops/toaster-container/actions

The tests in bitbake itself are out of date and probably do not work anymore.
https://git.openembedded.org/bitbake/tree/lib/toaster/tests/browser/README references ancient versions of Selenium and steps that are likely broken.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94233</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2022-10-24 22:39:17 +0000</bug_when>
    <thetext>Not likely to get to this anytime soon. Moving to &quot;Unassigned&quot; and &quot;NEW&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94739</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2023-01-17 17:11:44 +0000</bug_when>
    <thetext>During the YP Technical Meeting, we discussed installing Selenium on e.g. only the Ubuntu worker(s) (rather than using Docker and a container).

The instructions to install Selenium can be found in the getting started guide [1].

The steps are:
1. Install the Selenium Library (e.g. pip install selenium) [2]
2. Install the web browser drivers (currently our tests are for Firefox) [3][4]

The version of selenium installed (pip install) and the version of the web drivers would need to be kept in sync with the test cases/code. This is somewhat easier with the Docker container [5], but it is important to tear down the selenium container after running the tests or if the tests fail.

[1] https://www.selenium.dev/documentation/webdriver/getting_started/
[2] https://www.selenium.dev/documentation/webdriver/getting_started/install_library/
[3] https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/
[4] https://github.com/mozilla/geckodriver/releases
[5] https://hub.docker.com/r/selenium/standalone-firefox/tags</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97123</commentid>
    <comment_count>6</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-30 15:37:28 +0000</bug_when>
    <thetext>Build move to 5.0 -- ../Randy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98842</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-04-25 01:13:56 +0000</bug_when>
    <thetext>Bulk move of 5.0 medium importance issues to 5.99.
Move to 5.1 if you want to actively work on an issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98854</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-04-25 01:23:10 +0000</bug_when>
    <thetext>Move to 5.99 since no one is actively working on this issue.
Move to 5.x if you start on a task, please.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105322</commentid>
    <comment_count>9</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2026-04-30 15:22:10 +0000</bug_when>
    <thetext>We added toaster testing to the autobuilder as part of the STF work.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>