Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-07-28 18:25:09 +0000
committerRyan D. Brooks2016-08-31 16:18:06 +0000
commit32cabe6212237d9558083c15e04c6d1cae7558b0 (patch)
treedc897fc6e93b817f55c8dab326672952cfbfea79
parent1a657812af9d72fe655b832212b93c55bbc05212 (diff)
downloadorg.eclipse.osee-32cabe6212237d9558083c15e04c6d1cae7558b0.tar.gz
org.eclipse.osee-32cabe6212237d9558083c15e04c6d1cae7558b0.tar.xz
org.eclipse.osee-32cabe6212237d9558083c15e04c6d1cae7558b0.zip
refinement: Document test bundles with README files
-rw-r--r--plugins/org.eclipse.osee.ats.mocks/README.txt (renamed from plugins/org.eclipse.osee.orcs.db.mock/data/README.txt)10
-rw-r--r--plugins/org.eclipse.osee.ats.rest.test/README_BEFORE_RUNNING_TESTS.txt5
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/README_BEFORE_RUNNING_TESTS.txt3
-rw-r--r--plugins/org.eclipse.osee.client.test.framework/README.txt3
-rw-r--r--plugins/org.eclipse.osee.client.test.framework/src/org/eclipse/osee/client/test/framework/OseeClientIntegrationRule.java13
-rw-r--r--plugins/org.eclipse.osee.orcs.account.admin.test/README_BEFORE_RUNNING_TESTS.txt5
-rw-r--r--plugins/org.eclipse.osee.orcs.db.mock/README.txt19
7 files changed, 49 insertions, 9 deletions
diff --git a/plugins/org.eclipse.osee.orcs.db.mock/data/README.txt b/plugins/org.eclipse.osee.ats.mocks/README.txt
index 748a2a4b5b..75522010eb 100644
--- a/plugins/org.eclipse.osee.orcs.db.mock/data/README.txt
+++ b/plugins/org.eclipse.osee.ats.mocks/README.txt
@@ -1,4 +1,10 @@
-When database schema, types or dbinit change, the files in this data directory may need to be updated.
+This bundle provides mocks for use in testing and also supports the AtsIntegrationbyClassRule and
+AtsIntegrationByMethodRule.
+
+These rules will expand a canned ATS DbInit-ed database from the files located in the /data directory
+and provide a local database connection for integration type tests.
+
+When database schema, types or dbinit change, the files in the /data directory may need to be updated.
To do so:
1) Delete C:/Users/<account>/hsql and C:/Users/<account>/attr
@@ -9,5 +15,5 @@ To do so:
Note: These database files are written out to users home directory in a dir named after test
-All canned-db test bundles should be updated with the same zip files, there are
+All canned-db test bundles should be updated with the same zip files and tests updated accordingly.
- search for hsql.db for all locations
diff --git a/plugins/org.eclipse.osee.ats.rest.test/README_BEFORE_RUNNING_TESTS.txt b/plugins/org.eclipse.osee.ats.rest.test/README_BEFORE_RUNNING_TESTS.txt
new file mode 100644
index 0000000000..665ed9ddae
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.rest.test/README_BEFORE_RUNNING_TESTS.txt
@@ -0,0 +1,5 @@
+This test suite uses canned database from org.eclpise.osee.orcs.ats.mocks
+Database files will be copied out to users home directory for tests that require a db.
+If schema or breaking db changes are made, update database from instructions in that plugin.
+
+It does not require running an separate application server.
diff --git a/plugins/org.eclipse.osee.client.integration.tests/README_BEFORE_RUNNING_TESTS.txt b/plugins/org.eclipse.osee.client.integration.tests/README_BEFORE_RUNNING_TESTS.txt
new file mode 100644
index 0000000000..aeccf811c0
--- /dev/null
+++ b/plugins/org.eclipse.osee.client.integration.tests/README_BEFORE_RUNNING_TESTS.txt
@@ -0,0 +1,3 @@
+This test uses a manually run application server and db-inits a database for use by tests using org.eclipse.osee.client.test.framework.
+
+Run a local HSQL application server and run the OseeClient_Integration_TestSuite.launch
diff --git a/plugins/org.eclipse.osee.client.test.framework/README.txt b/plugins/org.eclipse.osee.client.test.framework/README.txt
new file mode 100644
index 0000000000..e36814d4aa
--- /dev/null
+++ b/plugins/org.eclipse.osee.client.test.framework/README.txt
@@ -0,0 +1,3 @@
+This bundle provides a client test framework that will db init a base Osee Client database for integration tests to use.
+
+It uses the OseeClientIntegrationRule to allow tests to ensure that a database has been initialized and is running.
diff --git a/plugins/org.eclipse.osee.client.test.framework/src/org/eclipse/osee/client/test/framework/OseeClientIntegrationRule.java b/plugins/org.eclipse.osee.client.test.framework/src/org/eclipse/osee/client/test/framework/OseeClientIntegrationRule.java
index e63acaf721..6433313b15 100644
--- a/plugins/org.eclipse.osee.client.test.framework/src/org/eclipse/osee/client/test/framework/OseeClientIntegrationRule.java
+++ b/plugins/org.eclipse.osee.client.test.framework/src/org/eclipse/osee/client/test/framework/OseeClientIntegrationRule.java
@@ -26,13 +26,13 @@ import org.junit.runners.model.FrameworkMethod;
* The OseeClientIntegration Rule initializes an OSEE database instance using the configuration specified. This rule
* should be added to all OSEE integration tests. The database will only be initialized for the first test in the test
* suite. Finally, the rule also guards against writing to production databases.
- *
+ *
* <pre>
* public class TestA {
- *
+ *
* &#064;Rule
* public OseeClientIntegrationRule rule = new OseeClientIntegrationRule(DemoChoice.OSEE_CLIENT_DEMO);
- *
+ *
* &#064;Test
* public void testA() {
* Artifact artifact =
@@ -41,7 +41,7 @@ import org.junit.runners.model.FrameworkMethod;
* }
* }
* </pre>
- *
+ *
* @author Roberto E. Escobar
*/
public final class OseeClientIntegrationRule extends AbstractTestRule {
@@ -72,7 +72,7 @@ public final class OseeClientIntegrationRule extends AbstractTestRule {
/**
* Invoked when a test method is about to start
- *
+ *
* @param method
*/
@Override
@@ -93,7 +93,7 @@ public final class OseeClientIntegrationRule extends AbstractTestRule {
/**
* Invoked when a test method finishes (whether passing or failing)
- *
+ *
* @param method
*/
@Override
@@ -108,7 +108,6 @@ public final class OseeClientIntegrationRule extends AbstractTestRule {
}
private static void checkNotProductionDataStore() throws OseeCoreException {
- // assertTrue("Should be run on demo database.", TestUtil.isDemoDb());
assertFalse("Not to be run on a production database.", isProductionDataStore());
}
diff --git a/plugins/org.eclipse.osee.orcs.account.admin.test/README_BEFORE_RUNNING_TESTS.txt b/plugins/org.eclipse.osee.orcs.account.admin.test/README_BEFORE_RUNNING_TESTS.txt
new file mode 100644
index 0000000000..d2d51ea425
--- /dev/null
+++ b/plugins/org.eclipse.osee.orcs.account.admin.test/README_BEFORE_RUNNING_TESTS.txt
@@ -0,0 +1,5 @@
+This test suite uses canned database from org.eclpise.osee.orcs.db.mock.
+Database files will be copied out to users home directory for tests that require a db.
+If schema or breaking db changes are made, update database from instructions in that plugin.
+
+It does not require running an separate application server.
diff --git a/plugins/org.eclipse.osee.orcs.db.mock/README.txt b/plugins/org.eclipse.osee.orcs.db.mock/README.txt
new file mode 100644
index 0000000000..2852e733d7
--- /dev/null
+++ b/plugins/org.eclipse.osee.orcs.db.mock/README.txt
@@ -0,0 +1,19 @@
+This bundle provides mocks for use in testing and also supports the OrcsIntegrationbyClassRule and
+OrcsIntegrationByMethodRule.
+
+These rules will expand a canned ATS DbInit-ed database from the files located in the /data directory
+and provide a local database connection for integration type tests.
+
+When database schema, types or dbinit change, the files in the /data directory may need to be updated.
+To do so:
+
+1) Delete C:/Users/<account>/hsql and C:/Users/<account>/attr
+2) Do a normal AtsClient_Integration_TestSuite, stop before ClientResourceTest
+3) Zip up hsql dir to hsql.zip and copy to this directory
+4) Zip up attr to binary_data.zip and copy to this directory
+5) Re-run the local Test Suite and fix any errors
+
+Note: These database files are written out to users home directory in a dir named after test
+
+All canned-db test bundles should be updated with the same zip files and tests updated accordingly.
+- search for hsql.db for all locations

Back to the top