diff --git a/e2e-test/src/main/resources/testdata/for-upgrade.xml b/e2e-test/src/main/resources/testdata/for-upgrade.xml
new file mode 100644
index 000000000..161fb2d02
--- /dev/null
+++ b/e2e-test/src/main/resources/testdata/for-upgrade.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+ content sub-file 1
+
+
+ content sub-file 2
+
+
+ content sub-file 3
+
+
+ content sub-file 4
+
+
+
+
+
+
+
+
+
+
+
+
+ file 1 content
+
+
+ file 2 content
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/e2e-test/src/test/java/org/alfresco/service/search/e2e/UpgradeTestCase.java b/e2e-test/src/test/java/org/alfresco/service/search/e2e/UpgradeTestCase.java
new file mode 100644
index 000000000..cda92302a
--- /dev/null
+++ b/e2e-test/src/test/java/org/alfresco/service/search/e2e/UpgradeTestCase.java
@@ -0,0 +1,44 @@
+package org.alfresco.service.search.e2e;
+
+import org.alfresco.cmis.CmisWrapper;
+import org.alfresco.utility.data.DataContent;
+import org.alfresco.utility.data.DataSite;
+import org.alfresco.utility.data.DataUser;
+import org.alfresco.utility.data.provider.XMLTestData;
+import org.alfresco.utility.network.ServerHealth;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
+import org.testng.annotations.BeforeClass;
+
+/**
+ * @author Paul Brodner
+ * We can use this class for both SearchService and InsightEngine
+ *
+ */
+@ContextConfiguration("classpath:alfresco-search-e2e-context.xml")
+public abstract class UpgradeTestCase extends AbstractTestNGSpringContextTests {
+
+ @Autowired
+ protected ServerHealth serverHealth;
+
+ @Autowired
+ protected DataUser dataUser;
+
+ @Autowired
+ protected DataSite dataSite;
+
+ @Autowired
+ protected DataContent dataContent;
+
+ @Autowired
+ protected CmisWrapper cmisAPI;
+
+ protected XMLTestData testData;
+
+ @BeforeClass(alwaysRun = true)
+ public void checkServerHealth() throws Exception
+ {
+ serverHealth.assertServerIsOnline();
+ }
+}
diff --git a/e2e-test/src/test/java/org/alfresco/service/search/e2e/searchservices/SearchServiceUpgradeTests.java b/e2e-test/src/test/java/org/alfresco/service/search/e2e/searchservices/SearchServiceUpgradeTests.java
new file mode 100644
index 000000000..bc0afd5e5
--- /dev/null
+++ b/e2e-test/src/test/java/org/alfresco/service/search/e2e/searchservices/SearchServiceUpgradeTests.java
@@ -0,0 +1,41 @@
+package org.alfresco.service.search.e2e.searchservices;
+
+import org.alfresco.service.search.e2e.UpgradeTestCase;
+import org.alfresco.utility.LogFactory;
+import org.alfresco.utility.Utility;
+import org.alfresco.utility.data.provider.XMLDataConfig;
+import org.alfresco.utility.data.provider.XMLTestData;
+import org.alfresco.utility.data.provider.XMLTestDataProvider;
+import org.alfresco.utility.model.QueryModel;
+import org.slf4j.Logger;
+import org.testng.annotations.Test;
+
+public class SearchServiceUpgradeTests extends UpgradeTestCase {
+
+ private static Logger LOG = LogFactory.getLogger();
+
+ @Test(dataProviderClass = XMLTestDataProvider.class, dataProvider = "getAllData")
+ @XMLDataConfig(file = "src/main/resources/testdata/for-upgrade.xml")
+ public void prepareData(XMLTestData testData) throws Exception {
+ LOG.info("Start Preparing data for Upgrade testing");
+ this.testData = testData;
+ this.testData.createUsers(dataUser);
+ this.testData.createSitesStructure(dataSite, dataContent, dataUser);
+ // wait for solr index
+ Utility.waitToLoopTime(20);
+ }
+
+ /**
+ * This should be executed after prepareData
+ * I am not adding a dependency here, because I want to play with pre/post upgrade scenarios directly in xml suite files.
+ */
+ @Test(dataProviderClass = XMLTestDataProvider.class, dataProvider = "getQueriesData")
+ @XMLDataConfig(file = "src/main/resources/testdata/for-upgrade.xml")
+ public void checkDataIsSearchable(QueryModel query) throws Exception
+ {
+ LOG.info("Start testing if data is searchable");
+ cmisAPI.authenticateUser(dataUser.getAdminUser())
+ .withQuery(query.getValue())
+ .applyNodeRefsFrom(testData).assertResultsCount().equals(query.getResults());
+ }
+}
diff --git a/e2e-test/src/test/resources/search-post-upgrade-suite.xml b/e2e-test/src/test/resources/search-post-upgrade-suite.xml
new file mode 100644
index 000000000..f571e4b95
--- /dev/null
+++ b/e2e-test/src/test/resources/search-post-upgrade-suite.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/e2e-test/src/test/resources/search-pre-upgrade-suite.xml b/e2e-test/src/test/resources/search-pre-upgrade-suite.xml
new file mode 100644
index 000000000..47772d41e
--- /dev/null
+++ b/e2e-test/src/test/resources/search-pre-upgrade-suite.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+