Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=profusion-mobi.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YreNHDRVkIMlWbLOgWP17FVM8ChKtvtMRjyLjmsrrjI=; b=h54fyOI1KFA7c+ADBtjZ2VmNa7XsopouH1umNsQJ1gz+xaSjP0lUuO/n76PAuq//PV zj3mzt6T6+EIjVmUUNoJaVdzSIGc/8nccPuqZ7xJgZvVD4WPxcOv21GThWiJKfHrszmu obE6R/dsnZrEFjjvHa7dG0OI4xip3swufI8uP6oYzMEifZVKNm5OZIVoFwVWO1ByBIGu hfOIlR997Mw2xLD7vL4L/Hbiqbh4goewB3VK90whop8DTSO9CmjKNk+Z4VXqLgnnV+rW 1tsLXPlidC+YGlLOCfAGMQPEqEYNNUO8cOkWrfKkHoUzQPgbgj33xEwFh3lhbEFzDMJK A7Ww== From: Guilherme Campos Camargo Date: Wed, 28 Mar 2018 21:08:25 -0300 Message-Id: <20180329000832.12268-10-guicc@profusion.mobi> In-Reply-To: <20180329000832.12268-1-guicc@profusion.mobi> References: <20180329000832.12268-1-guicc@profusion.mobi> Subject: [Fuego] [PATCH 09/16] Include add-jobs, add-views and build-jobs tests List-Id: Mailing list for the Fuego test framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fuego@lists.linuxfoundation.org Those tests are using a combination of ShExpect and SeleniumHQ for executing the command and checking if the website has responded properly. For now, SeleniumHQ is just being used for viewing the results on the website, and not for sending commands. In other words, build-jobs is being triggered through the command-line only, and not through the Jenkins UI. Signed-off-by: Guilherme Campos Camargo --- engine/tests/Functional.fuegotest/test_run.py | 34 +++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/engine/tests/Functional.fuegotest/test_run.py b/engine/tests/Functional.fuegotest/test_run.py index e03853b..09b3a95 100755 --- a/engine/tests/Functional.fuegotest/test_run.py +++ b/engine/tests/Functional.fuegotest/test_run.py @@ -516,20 +516,30 @@ def main(): return 1 COMMANDS_TO_TEST = [ - ShExpect( - 'echo $\'hello\n\n\nfrom\n\n\ncontainer\'', - r'hello\s+from\s+container'), - ShExpect( - 'cat -ThisOptionDoesNotExists', expected_result=1), - ShExpect('ftc add-nodes docker'), - ShExpect( - 'ftc list-nodes', r'Jenkins nodes in this system:\s*docker\s*.*'), - ShExpect('ftc add-jobs -b docker -p testplan_docker'), - ShExpect( - 'ftc list-jobs', r'Jenkins jobs in this system:(\s*docker\..*)+'), + # Set Selenium Browser root Visit(url=container.get_url()), + + # Add Nodes + ShExpect('ftc add-nodes docker'), + ShExpect('ftc list-nodes -q', r'.*docker.*'), + CheckText(_id='executors', text='master'), CheckText(_id='executors', text='docker'), - CheckText(_id='executors', text='master') + + # Add Fuego TestPlan + ShExpect('ftc add-jobs -b docker -p testplan_fuego_tests'), + ShExpect('ftc list-jobs', r'.*docker\.testplan_fuego_tests\.batch.*'), + + ClickLink(linktext='docker'), + CheckText(_id='projectstatus', text='docker.testplan_fuego_tests.batch'), + Back(), + + # Install Views + ShExpect('ftc add-view batch .*.batch'), + CheckText(_id='projectstatus-tabBar', text='batch'), + + # Start Tests + ShExpect('ftc build-jobs *.*.Functional.fuego_board_check'), + CheckText(_id='buildQueue', text='Functional.fuego_board_check'), ] if not execute_tests(args.timeout): -- 2.16.2