GEODE-3156: add AcceptanceTest gradle target and junit category
Project: http://git-wip-us.apache.org/repos/asf/geode/repo Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/ef688c8a Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/ef688c8a Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/ef688c8a Branch: refs/heads/feature/GEM-1483 Commit: ef688c8a3c5ba63f2da2f09e9ae3fca4dca37a62 Parents: 92f26f1 Author: Kirk Lund <kl...@apache.org> Authored: Mon Jul 10 14:43:33 2017 -0700 Committer: Kirk Lund <kl...@apache.org> Committed: Thu Jul 20 09:40:56 2017 -0700 ---------------------------------------------------------------------- geode-assembly/build.gradle | 1 + .../cli/commands/StatusLocatorRealGfshTest.java | 4 +-- .../test/junit/categories/AcceptanceTest.java | 26 ++++++++++++++++++++ gradle/test.gradle | 25 +++++++++++++------ 4 files changed, 46 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode/blob/ef688c8a/geode-assembly/build.gradle ---------------------------------------------------------------------- diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle index 19a73f3..02c9e33 100755 --- a/geode-assembly/build.gradle +++ b/geode-assembly/build.gradle @@ -411,6 +411,7 @@ def dependOnInstalledProduct = { // Add the configuration closure to the test targets so they depend on the install directory test dependOnInstalledProduct +acceptanceTest dependOnInstalledProduct distributedTest dependOnInstalledProduct integrationTest dependOnInstalledProduct flakyTest dependOnInstalledProduct http://git-wip-us.apache.org/repos/asf/geode/blob/ef688c8a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java ---------------------------------------------------------------------- diff --git a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java index 55f1a9c..3a98373 100644 --- a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java +++ b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StatusLocatorRealGfshTest.java @@ -20,9 +20,9 @@ import org.junit.experimental.categories.Category; import org.apache.geode.test.dunit.rules.gfsh.GfshRule; import org.apache.geode.test.dunit.rules.gfsh.GfshScript; -import org.apache.geode.test.junit.categories.DistributedTest; +import org.apache.geode.test.junit.categories.AcceptanceTest; -@Category(DistributedTest.class) +@Category(AcceptanceTest.class) public class StatusLocatorRealGfshTest { @Rule public GfshRule gfshRule = new GfshRule(); http://git-wip-us.apache.org/repos/asf/geode/blob/ef688c8a/geode-junit/src/main/java/org/apache/geode/test/junit/categories/AcceptanceTest.java ---------------------------------------------------------------------- diff --git a/geode-junit/src/main/java/org/apache/geode/test/junit/categories/AcceptanceTest.java b/geode-junit/src/main/java/org/apache/geode/test/junit/categories/AcceptanceTest.java new file mode 100644 index 0000000..78b78fd --- /dev/null +++ b/geode-junit/src/main/java/org/apache/geode/test/junit/categories/AcceptanceTest.java @@ -0,0 +1,26 @@ +/* + * 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 to determine whether or not a system satisfies the + * acceptance criteria and to determine whether or not to accept the system. + * + * Based on definition by ISTQB. + * + * @see <a href="http://softwaretestingfundamentals.com/acceptance-testing/">Acceptance Testing</a> + */ +public interface AcceptanceTest { +} http://git-wip-us.apache.org/repos/asf/geode/blob/ef688c8a/gradle/test.gradle ---------------------------------------------------------------------- diff --git a/gradle/test.gradle b/gradle/test.gradle index d4d6a2c..741c64e 100644 --- a/gradle/test.gradle +++ b/gradle/test.gradle @@ -69,6 +69,7 @@ subprojects { excludeCategories 'org.apache.geode.test.junit.categories.HydraTest' excludeCategories 'org.apache.geode.test.junit.categories.ContainerTest' excludeCategories 'org.apache.geode.test.junit.categories.UITest' + excludeCategories 'org.apache.geode.test.junit.categories.AcceptanceTest' } //Skip launching any DUnit VMs during this run. This will prevent @@ -80,11 +81,9 @@ subprojects { } } - test { useJUnit { includeCategories 'org.apache.geode.test.junit.categories.UnitTest' - excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest' } doFirst { @@ -123,8 +122,15 @@ subprojects { } reports.junitXml.destination = file "$buildDir/test-reports-flaky" - } + + task acceptanceTest(type:Test) { + useJUnit { + includeCategories 'org.apache.geode.test.junit.categories.AcceptanceTest' + } + forkEvery 1 + } + task securityTest(type:Test) { useJUnit { includeCategories 'org.apache.geode.test.junit.categories.SecurityTest' @@ -136,10 +142,8 @@ subprojects { } reports.junitXml.destination = file "$buildDir/test-reports-security" - } - task clientServerTest(type:Test) { useJUnit { includeCategories 'org.apache.geode.test.junit.categories.ClientServerTest' @@ -150,6 +154,7 @@ subprojects { } reports.junitXml.destination = file "$buildDir/test-reports-security" } + task dlockTest(type:Test) { useJUnit { includeCategories 'org.apache.geode.test.junit.categories.DLockTest' @@ -160,6 +165,7 @@ subprojects { } reports.junitXml.destination = file "$buildDir/test-reports-dlock" } + task backwardCompatibilityTest(type:Test) { useJUnit { includeCategories 'org.apache.geode.test.junit.categories.BackwardCompatibilityTest' @@ -170,6 +176,7 @@ subprojects { } reports.junitXml.destination = file "$buildDir/test-reports-backwardcompatibility" } + task membershipTest(type:Test) { useJUnit { includeCategories 'org.apache.geode.test.junit.categories.MembershipTest' @@ -180,6 +187,7 @@ subprojects { } reports.junitXml.destination = file "$buildDir/test-reports-membership" } + task restAPITest(type:Test) { useJUnit { includeCategories 'org.apache.geode.test.junit.categories.RestAPITest' @@ -191,9 +199,10 @@ subprojects { forkEvery 1 reports.junitXml.destination = file "$buildDir/test-reports-restAPI" } + task serializationTest(type:Test) { useJUnit { - includeCategories 'org.apache.geode.test.junit.categories.serializationTest' + includeCategories 'org.apache.geode.test.junit.categories.SerializationTest' excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest' } doFirst { @@ -273,12 +282,12 @@ subprojects { }) // Make precheckin task run all validation tests for checking in code. - task precheckin (dependsOn: [ build, integrationTest, distributedTest, flakyTest ]) { + task precheckin (dependsOn: [ build, acceptanceTest, integrationTest, distributedTest, flakyTest ]) { description 'Run this task before checking in code to validate changes. This task combines the following tasks: build, integrationTest, distributedTest, and flakyTest' } check.dependsOn checkMissedTests - combineReports.mustRunAfter check, test, integrationTest, distributedTest, flakyTest, checkMissedTests + combineReports.mustRunAfter check, test, acceptanceTest, integrationTest, distributedTest, flakyTest, checkMissedTests [build, check, test, integrationTest, distributedTest, flakyTest, checkMissedTests].each {it.finalizedBy combineReports} }