cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject svn commit: r1777589 - in /cayenne/site/cms/trunk: ./ content/dev/running-unit-tests.mdtext
Date Fri, 06 Jan 2017 11:04:24 GMT
Author: ntimofeev
Date: Fri Jan  6 11:04:24 2017
New Revision: 1777589

URL: http://svn.apache.org/viewvc?rev=1777589&view=rev
Log:
Update Running Unit Tests page:
 - describe in-memory databases
 - describe mysql-docker and postgres-docker
 - full list of databases
 - more examples of connection.properties

Modified:
    cayenne/site/cms/trunk/   (props changed)
    cayenne/site/cms/trunk/content/dev/running-unit-tests.mdtext

Propchange: cayenne/site/cms/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Jan  6 11:04:24 2017
@@ -0,0 +1,2 @@
+*.iml
+*.idea

Modified: cayenne/site/cms/trunk/content/dev/running-unit-tests.mdtext
URL: http://svn.apache.org/viewvc/cayenne/site/cms/trunk/content/dev/running-unit-tests.mdtext?rev=1777589&r1=1777588&r2=1777589&view=diff
==============================================================================
--- cayenne/site/cms/trunk/content/dev/running-unit-tests.mdtext (original)
+++ cayenne/site/cms/trunk/content/dev/running-unit-tests.mdtext Fri Jan  6 11:04:24 2017
@@ -22,7 +22,35 @@ or
     $ cd cayenne
     $ mvn clean verify
     
+### Running Against In-memory Database
+ 
+Besides HSQLDB mentioned above Cayenne has preconfigured connection information for 
+following databases that support in-memory mode:
+   
+* derby
+* h2
+* sqlite
+
+For this databases you can run tests without any additional configuration by only specifying
+*cayenneTestConnection* property that will activate required Maven profile:
+ 
+    $ mvn test -DcayenneTestConnection=derby    
+    
+### Running Against Database in Docker (only on Linux)
+
+Another handy option to run Cayenne tests is with preconfigured docker profiles.
+The only thing you need is to install Docker.
+
+You can run tests with following *cayenneTestConnection* properties:
+ 
+    $ mvn test -DcayenneTestConnection=mysql-docker
+or
+    
+    $ mvn test -DcayenneTestConnection=postgres-docker    
+    
 ### Running Against a Specific Database
+
+Final option to run tests against any supported database is with manual configuration. 
     
 #### Step 1. Install JDBC Driver Jars in a Local Maven Repo
     
@@ -46,11 +74,6 @@ the POM or the examples below.
     $ mvn install:install-file -Dfile=ojdbc5.jar -DgroupId=com.oracle \
            -DartifactId=oracle-driver -Dversion=11 -Dpackaging=jar -DgeneratePom=true
 
-**SQLite:**
-
-    $ mvn install:install-file -Dfile=sqlitejdbc-v056.jar -DgroupId=org.sqlite \
-           -DartifactId=sqlite-driver -Dversion=0.56 -Dpackaging=jar -DgeneratePom=true
-    
 **SQLServer:**
 
     $ mvn install:install-file -Dfile=sqljdbc4.jar -DgroupId=com.microsoft \
@@ -77,9 +100,12 @@ line options:
 *cayenneTestConnection* is a property activating a DB-specific Maven
 profile. *<profile_name>* can be one of:
 
+* db2
 * derby
-* h2
+* firebird
 * frontbase
+* h2
+* ingres
 * mysql
 * openbase
 * oracle
@@ -96,20 +122,29 @@ similar to this example:
     mysql.cayenne.adapter = org.apache.cayenne.dba.mysql.MySQLAdapter
     mysql.jdbc.username = someuser
     mysql.jdbc.password = somepasswd
-    mysql.jdbc.url = jdbc:someurl1
-    mysql.jdbc.driver = com.xyz.MyDriverClass
+    mysql.jdbc.url = jdbc:mysql://mysql.host:3306/test_db?useUnicode=true&characterEncoding=UTF-8&generateSimpleParameterMetadata=true
+    mysql.jdbc.driver = com.mysql.jdbc.Driver
     
     oracle.cayenne.adapter = org.apache.cayenne.dba.oracle.OracleAdapter
     oracle.jdbc.username = someuser
     oracle.jdbc.password = somepasswd
-    oracle.jdbc.url = jdbc:someurl2
-    oracle.jdbc.driver = com.xyz.MyDriverClass
+    oracle.jdbc.url = jdbc:oracle:thin:@//oracle.host:1521/XE
+    oracle.jdbc.driver = oracle.jdbc.driver.OracleDriver
+    
+    postgres.adapter = org.apache.cayenne.dba.postgres.PostgresAdapter
+    postgres.jdbc.username = someuser
+    postgres.jdbc.password = somepasswd
+    postgres.jdbc.url = jdbc:postgresql://postgresql.host:5432/test_db
+    postgres.jdbc.driver = org.postgresql.Driver
+    
+    db2.adapter = org.apache.cayenne.dba.db2.DB2Adapter
+    db2.jdbc.username = someuser
+    db2.jdbc.password = somepasswd
+    db2.jdbc.url = jdbc:db2://db2.host:50000/test_db
+    db2.jdbc.driver = com.ibm.db2.jcc.DB2Driver
     
 Each property starts with the Maven profile name ("mysql" and "oracle" in
 the example above). Note that in this case you should still use
 *cayenneTestConnection*. E.g.:
     
-    $ mvn test -DcayenneTestConnection=derby
-
-
-
+    $ mvn test -DcayenneTestConnection=mysql
\ No newline at end of file



Mime
View raw message