Skip to content
Snippets Groups Projects
Commit 44777830 authored by srosse's avatar srosse
Browse files

OO-1228: remove some profiles, more in the standard build process, create drop...

OO-1228: remove some profiles, more in the standard build process, create drop database for selenium tests, merge the different olat.local.properties for local, arquillian and eclipse
parent d1e12ed2
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ Preconditions:
6.2 Write the OpenOLAT database schema to the OpenOLAT database. Example for MySQL:
mysql -u openolat -p openolat < src/main/resources/database/mysql/setupDatabase.sql
6.3 Optional: if you want to run the jUnit tests, make sure you also create and initialize the test database
that you configured in src/test/profile/mysql/olat.eclipse.properties
that you configured in src/test/profile/mysql/olat.local.properties
7. In Eclipse: setup tomcat server by clicking on olat->Run As->"Run on Server".
7.1 The Run on Server wizard will pop up and check: manually define a new server
......
......@@ -45,7 +45,7 @@ junit and integration tests in OpenOLAT 8
* Execute jUnit integration tests
-----------------------------------------
- junit integration tests that load the framework to execute (execution time ca. 10-15m)
- junit integration tests that load the framework to execute (execution time ca. 10m)
- MySQL
mvn clean test -Dwith-mysql -Ptomcat
- PostgreSQL
......@@ -68,21 +68,19 @@ junit and integration tests in OpenOLAT 8
* Execute selenium functional integration tests
-----------------------------------------
- First build the application without tests (arquillian need the library before mvn give them)
mvn -DskipTests=true -Parquillian,tomcat clean package
- Run the tests
mvn -Parquillian,tomcat surefire:test
- selenium integration tests which started the whole web application in Tomcat (execution time ca. 10m)
- MySQL
mvn clean verify -DskipTests=true -Dwith-mysql -Ptomcat
- PostgreSQL
mvn clean verify -DskipTests=true -Dwith-postgresql -Ptomcat
You can add "clean-mysql-dbsetup" to the profils to drop / restore the database
The Selenium tests can be run with different browser but with some limitations:
- Chrome cannot do an upload
- Selenium need Firefox version 17
- Chrome/Safari cannot do an upload (tests which need an upload are ignored)
* Execute a single selenium functional integration test in Eclipse
-----------------------------------------
- First build the application without tests as before
mvn -DskipTests=true -Parquillian,tomcat clean package
mvn clean verify -DskipTests=true -DskipSeleniumTests=true -Ptomcat
- Run single test as JUnit Test in Eclipse
This diff is collapsed.
......@@ -53,7 +53,7 @@ public class ArquillianDeployments {
addResourceRecursive(new File(MAIN_RSRC), null, new AllFileFilter(), archive);
addWebResourceRecursive(new File(WEBAPP), "static", new StaticFileFilter(), archive);
archive.addAsResource(new File("src/test/profile/mysql", "olat.arquillian.properties"), "olat.local.properties");
archive.addAsResource(new File("src/test/profile/mysql", "olat.local.properties"), "olat.local.properties");
archive.setWebXML(new File(WEBINF_TOMCAT, "web.xml"));
return archive;
}
......
......@@ -42,7 +42,7 @@ smtp.host=disabled
# if you like to run your tests against mysql just uncomment the following. Please do not commit it!
#
db.vendor=mysql
db.name=olattest
db.name=${test.env.db.name:olattest}
db.user=olat
db.pass=olat
db.host.port=3306
......
......@@ -60,4 +60,3 @@ group.accept.membership.authors=false
group.accept.membership.usermanagers=false
group.accept.membership.groupmanagers=false
group.accept.membership.administrators=false
......@@ -7,44 +7,49 @@
tomcat.id=2
defaultlang=de
db.show_sql=false
#force use of java.io.tmpDir for unit tests
archive.dir=
log.dir=
folder.root=
restapi.enable=true
instance.id=${test.env.instance.id}
instance.id=${test.env.instance.id:2}
generate.index.at.startup=false
#disable debugging
olat.debug=false
localization.cache=true
is.translation.server=disabled
deploy.course.exports=false
# for UserTest
keepUserEmailAfterDeletion=true
keepUserLoginAfterDeletion=true
# do not run upgrades and scheduled jobs and such
cluster.singleton.services = disabled
jmx.rmi.port=${test.env.jmx.rmi.port.0}
jmx.rmi.port=${test.env.jmx.rmi.port.0:1009}
# SingleVM jms.broker.url
jms.broker.url=vm://embedded?broker.persistent=false
search.broker.url=vm://embedded?broker.persistent=false
# Cluster (remote) jms.broker.url
#jms.broker.url=failover:(tcp://localhost:${test.env.jms.broker.port}?wireFormat.maxInactivityDuration=0)
#search.broker.url=failover:(tcp://localhost:${test.env.jms.broker.port}?wireFormat.maxInactivityDuration=0)
smtp.host=testing
smtp.host=disabled
#
# if you like to run your tests against mysql just uncomment the following. Please do not commit it!
#
# mysql with c3p0
db.vendor=mysql
db.name=${test.env.db.name}
db.user=${test.env.db.user}
db.pass=${test.env.db.pass}
db.host.port=${test.env.db.host.port}
db.show_sql=false
db.name=${test.env.db.name:olattest}
db.user=${test.env.db.user:olat}
db.pass=${test.env.db.pass:olat}
db.host.port=${test.env.db.host.port:3306}
db.database.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
auto.upgrade.database=false
db.hibernate.c3p0.debugUnreturnedConnectionStackTraces=true
#site we need
site.portal.enable=true
#make sure it works it mimic the pre 8.3 behavior
group.mandatory.enrolment.email.users=false
......
......@@ -14,7 +14,7 @@ log.dir=
folder.root=
restapi.enable=true
instance.id=${test.env.instance.id}
instance.id=${test.env.instance.id:2}
generate.index.at.startup=false
......@@ -24,7 +24,7 @@ keepUserLoginAfterDeletion=true
# do not run upgrades and scheduled jobs and such
cluster.singleton.services = disabled
jmx.rmi.port=${test.env.jmx.rmi.port.0}
jmx.rmi.port=${test.env.jmx.rmi.port.0:1009}
# SingleVM jms.broker.url
jms.broker.url=vm://embedded?broker.persistent=false
......
......@@ -7,44 +7,49 @@
tomcat.id=2
defaultlang=de
db.show_sql=false
#force use of java.io.tmpDir for unit tests
archive.dir=
log.dir=
folder.root=
restapi.enable=true
instance.id=${test.env.instance.id}
instance.id=${test.env.instance.id:2}
generate.index.at.startup=false
#disable debugging
olat.debug=false
localization.cache=true
is.translation.server=disabled
deploy.course.exports=false
# for UserTest
keepUserEmailAfterDeletion=true
keepUserLoginAfterDeletion=true
# do not run upgrades and scheduled jobs and such
cluster.singleton.services = disabled
jmx.rmi.port=${test.env.jmx.rmi.port.0}
jmx.rmi.port=${test.env.jmx.rmi.port.0:1009}
# SingleVM jms.broker.url
jms.broker.url=vm://embedded?broker.persistent=false
search.broker.url=vm://embedded?broker.persistent=false
# Cluster (remote) jms.broker.url
#jms.broker.url=failover:(tcp://localhost:${test.env.jms.broker.port}?wireFormat.maxInactivityDuration=0)
#search.broker.url=failover:(tcp://localhost:${test.env.jms.broker.port}?wireFormat.maxInactivityDuration=0)
smtp.host=testing
smtp.host=disabled
#
# if you like to run your tests against mysql just uncomment the following. Please do not commit it!
#
# postgresql with c3p0
db.vendor=postgresql
db.name=${test.env.db.name}
db.user=${test.env.db.postgresql.user}
db.pass=${test.env.db.postgresql.pass}
db.host.port=${test.env.db.postgresql.host.port}
db.show_sql=false
db.name=${test.env.db.name:olattest}
db.user=${test.env.db.postgresql.user:postgres}
db.pass=${test.env.db.postgresql.pass:postgres}
db.host.port=${test.env.db.postgresql.host.port:5432}
db.database.dialect=org.hibernate.dialect.PostgreSQLDialect
auto.upgrade.database=false
db.hibernate.c3p0.debugUnreturnedConnectionStackTraces=true
#site we need
site.portal.enable=true
#make sure it works it mimic the pre 8.3 behavior
group.mandatory.enrolment.email.users=false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment