toaster: Create selenium tests for project dashboard page
cover toaster: Create selenium tests for project dashboard page
From: David Reyna <[email protected]>
toaster:test:Create selenium tests for project dashboard page
The following changes since commit eff56e4f0d59b1d965a68e4f009b7f07717b7edd:
bitbake: bitbake-user-manual: Fixed special character in -D output (2017-04-03 22:32:02 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib libby/toaster/functional_tests_9808
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=dreyna/submit/libby/toaster/functional_tests_9808
David Reyna (1):
toaster:test:Create selenium tests for project dashboard page
lib/toaster/tests/builds/buildtest.py | 110 +++++----- lib/toaster/tests/functional/__init__.py | 0 lib/toaster/tests/functional/functional_helpers.py | 122 +++++++++++ .../tests/functional/test_functional_basic.py | 243 +++++++++++++++++++++ 4 files changed, 421 insertions(+), 54 deletions(-) create mode 100644 bitbake/lib/toaster/tests/functional/__init__.py create mode 100644 bitbake/lib/toaster/tests/functional/functional_helpers.py create mode 100644 bitbake/lib/toaster/tests/functional/test_functional_basic.py
Signature · 1 line
1.9.1
PATCH 1/1 toaster:test:Create selenium tests for project dashboard page
From: David Reyna <[email protected]>
Added 7 new testcases that verify the UI interface and elements of the project detail page. This testcases can be found on testopia in the links:
Verifies that the project is created and that you get redirected to the configuration page
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1514
Verifies that the left side bar menu, all links are clickable and they show on the UI
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1515
Verifies that after creating a project the default project configuration is created
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1516
Verifies that the default machine is set, once creating the project
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1517
Verifies the built recipes information of the project detail page
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1518
Verifies the default release information of the project
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1519
Verifies that the default layers are assigned to the project
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1520
Verifies that the links to the Configuration, Builds, Import layer and New Custom Image are present and work.
[YOCTO #9808]
--- lib/toaster/tests/builds/buildtest.py | 110 +++++----- lib/toaster/tests/functional/__init__.py | 0 lib/toaster/tests/functional/functional_helpers.py | 122 +++++++++++ .../tests/functional/test_functional_basic.py | 243 +++++++++++++++++++++ 4 files changed, 421 insertions(+), 54 deletions(-) create mode 100644 bitbake/lib/toaster/tests/functional/__init__.py create mode 100644 bitbake/lib/toaster/tests/functional/functional_helpers.py create mode 100644 bitbake/lib/toaster/tests/functional/test_functional_basic.py
lib/toaster/tests/builds/buildtest.py +56 -54
@@ -41,6 +41,61 @@ logger = logging.getLogger("toaster") # want to wrap everything in a database transaction as an external process # (bitbake needs access to the database) +def load_build_environment(): + call_command('loaddata', 'settings.xml', app_label="orm") + call_command('loaddata', 'poky.xml', app_label="orm") + + current_builddir = os.environ.get("BUILDDIR") + if current_builddir: + BuildTest.BUILDDIR = current_builddir + else: + # Setup a builddir based on default layout + # bitbake inside openebedded-core + oe_init_build_env_path = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + os.pardir, + os.pardir, + os.pardir, + os.pardir, + os.pardir, + 'oe-init-build-env' + ) + if not os.path.exists(oe_init_build_env_path): + raise Exception("We had no BUILDDIR set and couldn't " + "find oe-init-build-env to set this up " + "ourselves please run oe-init-build-env " + "before running these tests") + + oe_init_build_env_path = os.path.realpath(oe_init_build_env_path) + cmd = "bash -c 'source oe-init-build-env %s'" % BuildTest.BUILDDIR + p = subprocess.Popen( + cmd, + cwd=os.path.dirname(oe_init_build_env_path), + shell=True, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + + output, err = p.communicate() + p.wait() + + logger.info("oe-init-build-env %s %s" % (output, err)) + + os.environ['BUILDDIR'] = BuildTest.BUILDDIR + + # Setup the path to bitbake we know where to find this + bitbake_path = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + os.pardir, + os.pardir, + os.pardir, + os.pardir, + 'bin', + 'bitbake') + if not os.path.exists(bitbake_path): + raise Exception("Could not find bitbake at the expected path %s" + % bitbake_path) + + os.environ['BBBASEDIR'] = bitbake_path class BuildTest(unittest.TestCase):
@@ -59,60 +114,7 @@ class BuildTest(unittest.TestCase): if built: return built - call_command('loaddata', 'settings.xml', app_label="orm") - call_command('loaddata', 'poky.xml', app_label="orm") - - current_builddir = os.environ.get("BUILDDIR") - if current_builddir: - BuildTest.BUILDDIR = current_builddir - else: - # Setup a builddir based on default layout - # bitbake inside openebedded-core - oe_init_build_env_path = os.path.join( - os.path.dirname(os.path.abspath(__file__)), - os.pardir, - os.pardir, - os.pardir, - os.pardir, - os.pardir, - 'oe-init-build-env' - ) - if not os.path.exists(oe_init_build_env_path): - raise Exception("We had no BUILDDIR set and couldn't " - "find oe-init-build-env to set this up " - "ourselves please run oe-init-build-env " - "before running these tests") - - oe_init_build_env_path = os.path.realpath(oe_init_build_env_path) - cmd = "bash -c 'source oe-init-build-env %s'" % BuildTest.BUILDDIR - p = subprocess.Popen( - cmd, - cwd=os.path.dirname(oe_init_build_env_path), - shell=True, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - - output, err = p.communicate() - p.wait() - - logger.info("oe-init-build-env %s %s" % (output, err)) - - os.environ['BUILDDIR'] = BuildTest.BUILDDIR - - # Setup the path to bitbake we know where to find this - bitbake_path = os.path.join( - os.path.dirname(os.path.abspath(__file__)), - os.pardir, - os.pardir, - os.pardir, - os.pardir, - 'bin', - 'bitbake') - if not os.path.exists(bitbake_path): - raise Exception("Could not find bitbake at the expected path %s" - % bitbake_path) - - os.environ['BBBASEDIR'] = bitbake_path + load_build_environment() BuildEnvironment.objects.get_or_create( betype=BuildEnvironment.TYPE_LOCAL,
lib/toaster/tests/functional/__init__.py new file +0 -0
lib/toaster/tests/functional/functional_helpers.py new file +122 -0
122 lines not on this page · raw message
lib/toaster/tests/functional/test_functional_basic.py new file +243 -0
243 lines not on this page · raw message
Signature · 1 line
1.9.1