[Fuego] [PATCH 03/14] Add a CheckScreenshot command into the COMMANDS_TO_TEST list

Guilherme Campos Camargo guicc at profusion.mobi
Tue Apr 24 17:24:40 UTC 2018


This test will take a screenshot of 'tasks' element from the side-panel
of the Jenkins UI (that contains the 'New Item', 'People', 'Build
History' and the 'Manage Jenkins' buttons) and compare it with an image
that's stored in the workdir, called 'side-panel-tasks.png'. The allowed
threshold is 0.1 (10%).

Signed-off-by: Guilherme Campos Camargo <guicc at profusion.mobi>
---
 engine/tests/Functional.fuego_release_test/test_run.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/engine/tests/Functional.fuego_release_test/test_run.py b/engine/tests/Functional.fuego_release_test/test_run.py
index b380acd..2075862 100755
--- a/engine/tests/Functional.fuego_release_test/test_run.py
+++ b/engine/tests/Functional.fuego_release_test/test_run.py
@@ -725,6 +725,12 @@ def main():
               'docker.default.Functional.hello_world"]'),
         CheckText(By.ID, 'executors',
                   text='docker.default.Functional.hello_world'),
+
+        # Compare screenshot of an element of Jenkins UI
+        CheckScreenshot(By.ID, 'tasks',
+                        rm_images_on_success=True,
+                        ref_img='screenshots/side-panel-tasks.png',
+                        threshold=0.1)
     ]
 
     if not execute_tests(args.timeout):
-- 
2.17.0



More information about the Fuego mailing list