geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbarr...@apache.org
Subject [geode] 45/46: GEODE-5363: Run uiTests from new source set.
Date Wed, 11 Jul 2018 16:13:52 GMT
This is an automated email from the ASF dual-hosted git repository.

jbarrett pushed a commit to branch feature/GEODE-5363
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 05d2560b1943f9ca4810123c2ebc337027019cc6
Author: Jacob Barrett <jbarrett@pivotal.io>
AuthorDate: Wed Jul 11 08:44:44 2018 -0700

    GEODE-5363: Run uiTests from new source set.
---
 geode-assembly/build.gradle                        |  8 --------
 .../tools/pulse/ui/PulseAcceptanceAuthTest.java    |  3 ---
 .../tools/pulse/ui/PulseAcceptanceNoAuthTest.java  |  3 ---
 .../apache/geode/test/junit/categories/UITest.java | 21 --------------------
 geode-pulse/build.gradle                           | 12 -----------
 .../tools/pulse/tests/junit/BaseServiceTest.java   |  3 ---
 .../pulse/tests/ui/PulseAnonymousUserTest.java     |  3 ---
 .../geode/tools/pulse/tests/ui/PulseAuthTest.java  |  3 ---
 .../tools/pulse/tests/ui/PulseAutomatedTest.java   |  3 ---
 .../tools/pulse/tests/ui/PulseNoAuthTest.java      |  3 ---
 gradle/test.gradle                                 | 23 ++++++++++++++++++++--
 11 files changed, 21 insertions(+), 64 deletions(-)

diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index 8319b09..2dbf7f4 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -440,14 +440,6 @@ def dependOnInstalledProduct = {
   environment ('GEODE_HOME', install)
 }
 
-task uiTest(type: Test) {
-    useJUnit {
-        includeCategories 'org.apache.geode.test.junit.categories.UITest'
-        excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-    }
-    forkEvery(1)
-}
-
 // Add the configuration closure to the test targets so they depend on the install directory
 test dependOnInstalledProduct
 acceptanceTest dependOnInstalledProduct
diff --git a/geode-assembly/src/uiTest/java/org/apache/geode/tools/pulse/ui/PulseAcceptanceAuthTest.java
b/geode-assembly/src/uiTest/java/org/apache/geode/tools/pulse/ui/PulseAcceptanceAuthTest.java
index caae0b7..d8aab18 100644
--- a/geode-assembly/src/uiTest/java/org/apache/geode/tools/pulse/ui/PulseAcceptanceAuthTest.java
+++ b/geode-assembly/src/uiTest/java/org/apache/geode/tools/pulse/ui/PulseAcceptanceAuthTest.java
@@ -22,12 +22,10 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.ClassRule;
 import org.junit.Rule;
-import org.junit.experimental.categories.Category;
 import org.openqa.selenium.WebDriver;
 
 import org.apache.geode.examples.SimpleSecurityManager;
 import org.apache.geode.test.dunit.rules.ClusterStartupRule;
-import org.apache.geode.test.junit.categories.UITest;
 import org.apache.geode.test.junit.rules.EmbeddedPulseRule;
 import org.apache.geode.test.junit.rules.GfshCommandRule;
 import org.apache.geode.test.junit.rules.LocatorStarterRule;
@@ -35,7 +33,6 @@ import org.apache.geode.tools.pulse.internal.data.Cluster;
 import org.apache.geode.tools.pulse.tests.rules.ScreenshotOnFailureRule;
 import org.apache.geode.tools.pulse.tests.rules.WebDriverRule;
 
-@Category(UITest.class)
 public class PulseAcceptanceAuthTest extends PulseAcceptanceTestBase {
 
   @ClassRule
diff --git a/geode-assembly/src/uiTest/java/org/apache/geode/tools/pulse/ui/PulseAcceptanceNoAuthTest.java
b/geode-assembly/src/uiTest/java/org/apache/geode/tools/pulse/ui/PulseAcceptanceNoAuthTest.java
index 6b9a806..6ee6374 100644
--- a/geode-assembly/src/uiTest/java/org/apache/geode/tools/pulse/ui/PulseAcceptanceNoAuthTest.java
+++ b/geode-assembly/src/uiTest/java/org/apache/geode/tools/pulse/ui/PulseAcceptanceNoAuthTest.java
@@ -20,11 +20,9 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.ClassRule;
 import org.junit.Rule;
-import org.junit.experimental.categories.Category;
 import org.openqa.selenium.WebDriver;
 
 import org.apache.geode.test.dunit.rules.ClusterStartupRule;
-import org.apache.geode.test.junit.categories.UITest;
 import org.apache.geode.test.junit.rules.EmbeddedPulseRule;
 import org.apache.geode.test.junit.rules.GfshCommandRule;
 import org.apache.geode.test.junit.rules.LocatorStarterRule;
@@ -32,7 +30,6 @@ import org.apache.geode.tools.pulse.internal.data.Cluster;
 import org.apache.geode.tools.pulse.tests.rules.ScreenshotOnFailureRule;
 import org.apache.geode.tools.pulse.tests.rules.WebDriverRule;
 
-@Category(UITest.class)
 public class PulseAcceptanceNoAuthTest extends PulseAcceptanceTestBase {
 
   @ClassRule
diff --git a/geode-junit/src/main/java/org/apache/geode/test/junit/categories/UITest.java
b/geode-junit/src/main/java/org/apache/geode/test/junit/categories/UITest.java
deleted file mode 100755
index 9c54c4c..0000000
--- a/geode-junit/src/main/java/org/apache/geode/test/junit/categories/UITest.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information
regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain
a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
- * or implied. See the License for the specific language governing permissions and limitations
under
- * the License.
- */
-package org.apache.geode.test.junit.categories;
-
-/**
- * JUnit Test Category that specifies a test involving a browser present to test the UI
- */
-public interface UITest {
-}
diff --git a/geode-pulse/build.gradle b/geode-pulse/build.gradle
index 605aab7..c9d17b2 100755
--- a/geode-pulse/build.gradle
+++ b/geode-pulse/build.gradle
@@ -151,18 +151,6 @@ war {
   classpath project(':geode-core').webJar.archivePath
 }
 
-task uiTest(type:Test) {
-  useJUnit {
-    includeCategories 'org.apache.geode.test.junit.categories.UITest'
-    excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
-  }
-
-  forkEvery(1)
-  doFirst {
-    TestPropertiesWriter.writeTestProperties(buildDir, name)
-  }
-}
-
 uiTest.dependsOn war
 uiTest.finalizedBy rootProject.combineReports
 rootProject.combineReports.mustRunAfter uiTest
diff --git a/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/junit/BaseServiceTest.java
b/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/junit/BaseServiceTest.java
index 1ed3da2..59f082e 100644
--- a/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/junit/BaseServiceTest.java
+++ b/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/junit/BaseServiceTest.java
@@ -42,9 +42,7 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
-import org.junit.experimental.categories.Category;
 
-import org.apache.geode.test.junit.categories.UITest;
 
 
 /**
@@ -58,7 +56,6 @@ import org.apache.geode.test.junit.categories.UITest;
  *
  */
 @Ignore
-@Category(UITest.class)
 public abstract class BaseServiceTest {
 
   protected static Properties propsForJUnit = new Properties();
diff --git a/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseAnonymousUserTest.java
b/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseAnonymousUserTest.java
index 4785b13..6ef7298 100644
--- a/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseAnonymousUserTest.java
+++ b/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseAnonymousUserTest.java
@@ -23,17 +23,14 @@ import org.junit.ClassRule;
 import org.junit.FixMethodOrder;
 import org.junit.Rule;
 import org.junit.Test;
-import org.junit.experimental.categories.Category;
 import org.junit.runners.MethodSorters;
 import org.openqa.selenium.By;
 import org.openqa.selenium.WebElement;
 
-import org.apache.geode.test.junit.categories.UITest;
 import org.apache.geode.tools.pulse.tests.rules.ScreenshotOnFailureRule;
 import org.apache.geode.tools.pulse.tests.rules.ServerRule;
 import org.apache.geode.tools.pulse.tests.rules.WebDriverRule;
 
-@Category(UITest.class)
 @FixMethodOrder(MethodSorters.JVM)
 public class PulseAnonymousUserTest {
 
diff --git a/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseAuthTest.java
b/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseAuthTest.java
index 9bcd4f7..3bef529 100644
--- a/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseAuthTest.java
+++ b/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseAuthTest.java
@@ -19,16 +19,13 @@ import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.FixMethodOrder;
 import org.junit.Rule;
-import org.junit.experimental.categories.Category;
 import org.junit.runners.MethodSorters;
 import org.openqa.selenium.WebDriver;
 
-import org.apache.geode.test.junit.categories.UITest;
 import org.apache.geode.tools.pulse.tests.rules.ScreenshotOnFailureRule;
 import org.apache.geode.tools.pulse.tests.rules.ServerRule;
 import org.apache.geode.tools.pulse.tests.rules.WebDriverRule;
 
-@Category(UITest.class)
 @FixMethodOrder(MethodSorters.JVM)
 public class PulseAuthTest extends PulseBase {
 
diff --git a/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseAutomatedTest.java
b/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseAutomatedTest.java
index cbf7299..7732e6d 100644
--- a/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseAutomatedTest.java
+++ b/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseAutomatedTest.java
@@ -73,12 +73,10 @@ import org.junit.ClassRule;
 import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
-import org.junit.experimental.categories.Category;
 import org.openqa.selenium.By;
 import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.WebElement;
 
-import org.apache.geode.test.junit.categories.UITest;
 import org.apache.geode.tools.pulse.tests.DataBrowserResultLoader;
 import org.apache.geode.tools.pulse.tests.PulseTestData;
 import org.apache.geode.tools.pulse.tests.PulseTestLocators;
@@ -86,7 +84,6 @@ import org.apache.geode.tools.pulse.tests.rules.ScreenshotOnFailureRule;
 import org.apache.geode.tools.pulse.tests.rules.ServerRule;
 import org.apache.geode.tools.pulse.tests.rules.WebDriverRule;
 
-@Category(UITest.class)
 public class PulseAutomatedTest extends PulseBase {
 
   @ClassRule
diff --git a/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseNoAuthTest.java
b/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseNoAuthTest.java
index 1788a93..c854268 100644
--- a/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseNoAuthTest.java
+++ b/geode-pulse/src/uiTest/java/org/apache/geode/tools/pulse/tests/ui/PulseNoAuthTest.java
@@ -19,16 +19,13 @@ import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.FixMethodOrder;
 import org.junit.Rule;
-import org.junit.experimental.categories.Category;
 import org.junit.runners.MethodSorters;
 import org.openqa.selenium.WebDriver;
 
-import org.apache.geode.test.junit.categories.UITest;
 import org.apache.geode.tools.pulse.tests.rules.ScreenshotOnFailureRule;
 import org.apache.geode.tools.pulse.tests.rules.ServerRule;
 import org.apache.geode.tools.pulse.tests.rules.WebDriverRule;
 
-@Category(UITest.class)
 @FixMethodOrder(MethodSorters.JVM)
 public class PulseNoAuthTest extends PulseBase {
 
diff --git a/gradle/test.gradle b/gradle/test.gradle
index 7f91df9..a58843f 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -110,6 +110,15 @@ subprojects {
       }
       resources.srcDir file('src/acceptanceTest/resources')
     }
+
+      uiTest {
+      java {
+        compileClasspath += main.output + test.output
+        runtimeClasspath += main.output + test.output
+        srcDir file('src/uiTest/java')
+      }
+      resources.srcDir file('src/uiTest/resources')
+    }
   }
 
   task integrationTest(type:Test) {
@@ -142,8 +151,17 @@ subprojects {
   }
 
   task acceptanceTest(type:Test) {
-    testClassesDirs = sourceSets.acceptanceTest.output.classesDirs
-    classpath = sourceSets.acceptanceTest.runtimeClasspath
+      testClassesDirs = sourceSets.acceptanceTest.output.classesDirs
+      classpath = sourceSets.acceptanceTest.runtimeClasspath
+
+      forkEvery 1
+
+      outputs.upToDateWhen{false}
+  }
+
+  task uiTest(type:Test) {
+    testClassesDirs = sourceSets.uiTest.output.classesDirs
+    classpath = sourceSets.uiTest.runtimeClasspath
 
     forkEvery 1
 
@@ -151,6 +169,7 @@ subprojects {
   }
 
 
+
   task flakyTest(type:Test) {
     useJUnit {
       includeCategories 'org.apache.geode.test.junit.categories.FlakyTest'


Mime
View raw message