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=PApXk3uJbHkaYezP3eWQT5o2PqiRwIHjRpTlZ1sexFDvOp31qQkiSPkI2OZKYT0HvL dYDOr6592ubxg6vBN6mID8rKdw/jXxU8I5lJRJVBQfRYUK8c2DsvkbgKeYQy0m97AX6i zRqMFVWScKCbJcs49zmvS3zTL9Yk8r4N1R7ZomLkCwtZCFpXzdwvpU5eTsJ6OYhBU7yW LmoaoQnwNJFJhHGCCPkX0dwshERG2vURZAb3ltmCAiBV5G5d34wOXBtpAH7urflBrXdn mrso3ZO+ylh6ggcDatRInAUloS900aRPyGaSDH0a9CLrZPeli4UjkI3E3YfDdJ/u3hu7 HFOg== From: Guilherme Campos Camargo Date: Wed, 7 Mar 2018 16:54:58 -0300 Message-Id: <20180307195459.16757-11-guicc@profusion.mobi> In-Reply-To: <20180307195459.16757-1-guicc@profusion.mobi> References: <20180307195459.16757-1-guicc@profusion.mobi> Subject: [Fuego] [PATCH 10/11] 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