From fb295a8d567e3d98743f448520e95f17d3596bbf Mon Sep 17 00:00:00 2001 From: Tomasz Kaik Date: Wed, 1 Aug 2018 16:32:32 +0200 Subject: [PATCH] Timeout-based integration tests stabilization Modified timeouts on Sample Site and Test Suite to fix tests results for SeleniumGrid+Chrome migration. Updated functional tests --- .../main/webapp/sanity/modifiers/sleep/failed.jsp | 2 +- .../element-will-cover-timestamp.jsp | 2 +- .../image-will-cover-timestamp.jsp | 2 +- .../sanity/modifiers/wait-for-page-loaded/delay.jsp | 2 +- .../aet/sanity/functional/HomePageTilesTest.java | 4 ++-- .../src/test/resources/features/filtering.feature | 6 +++--- .../test-suite/partials/sleep-modifier.xml | 2 +- .../partials/wait-for-element-to-be-visible.xml | 2 +- .../partials/wait-for-image-completion.xml | 13 +++++++------ 9 files changed, 18 insertions(+), 17 deletions(-) diff --git a/integration-tests/sample-site/src/main/webapp/sanity/modifiers/sleep/failed.jsp b/integration-tests/sample-site/src/main/webapp/sanity/modifiers/sleep/failed.jsp index 61d346c68..5abb64abe 100644 --- a/integration-tests/sample-site/src/main/webapp/sanity/modifiers/sleep/failed.jsp +++ b/integration-tests/sample-site/src/main/webapp/sanity/modifiers/sleep/failed.jsp @@ -28,7 +28,7 @@ java.util.Date date = new java.util.Date(); <%@ include file="/includes/bodyContent.jsp" %> <%@ include file="/includes/footer.jsp" %> diff --git a/integration-tests/sample-site/src/main/webapp/sanity/modifiers/wait-for-element-to-be-visible/element-will-cover-timestamp.jsp b/integration-tests/sample-site/src/main/webapp/sanity/modifiers/wait-for-element-to-be-visible/element-will-cover-timestamp.jsp index 14fc56bcb..0f25aa564 100644 --- a/integration-tests/sample-site/src/main/webapp/sanity/modifiers/wait-for-element-to-be-visible/element-will-cover-timestamp.jsp +++ b/integration-tests/sample-site/src/main/webapp/sanity/modifiers/wait-for-element-to-be-visible/element-will-cover-timestamp.jsp @@ -25,7 +25,7 @@ <% diff --git a/integration-tests/sample-site/src/main/webapp/sanity/modifiers/wait-for-image-completion/image-will-cover-timestamp.jsp b/integration-tests/sample-site/src/main/webapp/sanity/modifiers/wait-for-image-completion/image-will-cover-timestamp.jsp index dfc32644c..fb44d529a 100644 --- a/integration-tests/sample-site/src/main/webapp/sanity/modifiers/wait-for-image-completion/image-will-cover-timestamp.jsp +++ b/integration-tests/sample-site/src/main/webapp/sanity/modifiers/wait-for-image-completion/image-will-cover-timestamp.jsp @@ -25,7 +25,7 @@ <% diff --git a/integration-tests/sample-site/src/main/webapp/sanity/modifiers/wait-for-page-loaded/delay.jsp b/integration-tests/sample-site/src/main/webapp/sanity/modifiers/wait-for-page-loaded/delay.jsp index 49798f7aa..813010c55 100644 --- a/integration-tests/sample-site/src/main/webapp/sanity/modifiers/wait-for-page-loaded/delay.jsp +++ b/integration-tests/sample-site/src/main/webapp/sanity/modifiers/wait-for-page-loaded/delay.jsp @@ -59,6 +59,6 @@ elementToChange.innerHTML = 'Final Text That is displayed after timeout while page elements are still loading.'; } ++COUNTER; - }, t * 600); + }, t * 1000); } diff --git a/integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/HomePageTilesTest.java b/integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/HomePageTilesTest.java index 9ef03e614..aca3e36e8 100644 --- a/integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/HomePageTilesTest.java +++ b/integration-tests/sanity-functional/src/test/java/com/cognifide/aet/sanity/functional/HomePageTilesTest.java @@ -29,9 +29,9 @@ @Modules(GuiceModule.class) public class HomePageTilesTest { - private static final int TESTS = 113; + private static final int TESTS = 115; - private static final int EXPECTED_TESTS_SUCCESS = 66; + private static final int EXPECTED_TESTS_SUCCESS = 68; private static final int EXPECTED_TESTS_WARN = 5; diff --git a/integration-tests/sanity-functional/src/test/resources/features/filtering.feature b/integration-tests/sanity-functional/src/test/resources/features/filtering.feature index f10a12479..b0892c95a 100644 --- a/integration-tests/sanity-functional/src/test/resources/features/filtering.feature +++ b/integration-tests/sanity-functional/src/test/resources/features/filtering.feature @@ -37,8 +37,8 @@ Feature: Tests Results Filtering Scenario: Filtering Tests Results: layout Given I have opened sample tests report page When I search for tests containing "layout" - Then There are 13 tiles visible - And Statistics text contains "13 ( 3 / 0 / 10 / 0 )" + Then There are 15 tiles visible + And Statistics text contains "15 ( 4 / 0 / 11 / 0 )" Scenario: Filtering Tests Results: jserrors Given I have opened sample tests report page @@ -98,4 +98,4 @@ Feature: Tests Results Filtering Given I have opened sample tests report page When I search for tests containing "wait-for-image-completion" Then There are 4 tiles visible - And Statistics text contains "4 ( 2 / 0 / 2 / 0 )" + And Statistics text contains "4 ( 1 / 0 / 3 / 0 )" diff --git a/integration-tests/test-suite/partials/sleep-modifier.xml b/integration-tests/test-suite/partials/sleep-modifier.xml index 0cbd0e81b..7397c25aa 100644 --- a/integration-tests/test-suite/partials/sleep-modifier.xml +++ b/integration-tests/test-suite/partials/sleep-modifier.xml @@ -25,7 +25,7 @@ - + diff --git a/integration-tests/test-suite/partials/wait-for-element-to-be-visible.xml b/integration-tests/test-suite/partials/wait-for-element-to-be-visible.xml index 40580dfb1..35d76f77a 100644 --- a/integration-tests/test-suite/partials/wait-for-element-to-be-visible.xml +++ b/integration-tests/test-suite/partials/wait-for-element-to-be-visible.xml @@ -25,7 +25,7 @@ - + diff --git a/integration-tests/test-suite/partials/wait-for-image-completion.xml b/integration-tests/test-suite/partials/wait-for-image-completion.xml index 20dbd4058..cd13c9718 100644 --- a/integration-tests/test-suite/partials/wait-for-image-completion.xml +++ b/integration-tests/test-suite/partials/wait-for-image-completion.xml @@ -24,7 +24,7 @@ - + @@ -39,8 +39,8 @@ - - + + @@ -54,7 +54,7 @@ - + @@ -67,11 +67,12 @@ - + + - +