/
Sakai Test Harness
Sakai Test Harness
- Sakai v2.1.x based on v2.1.2
- Test-Harness Enhancements
- Enable log4j for your objects in both the Impl and Test
- test-harness --> src --> conf --> log4j.properties
### Default to error-only logging. Selectively expose more in your test classes ### if you need to, but don't change the default, since the sakai component ### loading is quite noisy. log4j.rootLogger=error,stdout ### Write test output to the console log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n ### Show debug information for the test harness itself, and any critical collaborators log4j.logger.org.sakaiproject.test.SakaiTestBase=debug log4j.logger.org.sakaiproject.test.SakaiTestTimer=debug #log4j.logger.org.apache.catalina.loader.WebappClassLoader=debug #log4j.logger.org.sakaiproject.util.ComponentsLoader=debug ### Use this syntax to open logging for any failing components to help debug the problem #log4j.logger.org.sakaiproject.component.section.sakai21.SectionAwarenessImpl=debug log4j.logger.edu.ucdavis.sakai=debug
- test-harness --> src --> conf --> log4j.properties
- Make sure that you add the following to "maven.repo.remote" in build.properties
- Configure test-harness' project.xml to include UCD specific dependencies
- test-harness --> project.xml
<?xml version="1.0" encoding="UTF-8"?> <project> <pomVersion>3</pomVersion> <extend>../master/project.xml</extend> <name>Sakai Test Harness</name> <groupId>sakaiproject</groupId> <id>sakai-test-harness</id> <currentVersion>${sakai.version}</currentVersion> <properties> <deploy.type>jar</deploy.type> </properties> <dependencies> <!-- UCD Dependencies --> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-ucd-enterprise-data-service-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-ucd-enterprise-data-service-impl</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>oracle</groupId> <artifactId>ojdbc14</artifactId> <jar>ojdbc14.jar</jar> <type>jar</type> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java-3.1.12-bin</artifactId> <jar>mysql-connector-java-3.1.12-bin.jar</jar> <type>jar</type> </dependency> <!-- Sakai plugin --> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai</artifactId> <version>${sakai.plugin.version}</version> <type>plugin</type> </dependency> <!-- JUnit --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> </dependency> <!-- log4j dependency (since we configure the test harness with log4j) --> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.9</version> </dependency> <!-- Tomcat jars, which provide the webapp classloader --> <dependency> <groupId>tomcat</groupId> <artifactId>catalina</artifactId> <version>5.5.9</version> </dependency> <dependency> <groupId>tomcat</groupId> <artifactId>naming-resources</artifactId> <version>5.5.9</version> </dependency> <dependency> <groupId>tomcat</groupId> <artifactId>tomcat-util</artifactId> <version>5.5.9</version> </dependency> <dependency> <groupId>servletapi</groupId> <artifactId>servletapi</artifactId> <version>2.4-20040521</version> <url>http://java.sun.com/products/servlet/</url> </dependency> <dependency> <groupId>portlet-api</groupId> <artifactId>portlet-api</artifactId> <version>1.0.1</version> </dependency> <!-- Sakai's shared/lib and common/lib dependencies --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.0.4</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.0</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.1</version> </dependency> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.2.1</version> </dependency> <dependency> <groupId>commons-pool</groupId> <artifactId>commons-pool</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>activation</groupId> <artifactId>activation</artifactId> <version>1.0.2</version> </dependency> <dependency> <groupId>javamail</groupId> <artifactId>mail</artifactId> <version>1.3.1</version> </dependency> <dependency> <groupId>springframework</groupId> <artifactId>spring</artifactId> <version>${sakai.spring.version}</version> </dependency> <dependency> <groupId>hsqldb</groupId> <artifactId>hsqldb</artifactId> <version>1.7.3.3</version> </dependency> <dependency> <groupId>aopalliance</groupId> <artifactId>aopalliance</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>cglib</groupId> <artifactId>cglib-full</artifactId> <version>2.0.2</version> </dependency> <dependency> <groupId>dom4j</groupId> <artifactId>dom4j</artifactId> <version>1.6</version> </dependency> <dependency> <groupId>ehcache</groupId> <artifactId>ehcache</artifactId> <version>1.1</version> </dependency> <dependency> <groupId>hibernate</groupId> <artifactId>hibernate</artifactId> <version>2.1.8</version> </dependency> <dependency> <groupId>jdbc</groupId> <artifactId>jdbc2_0-stdext</artifactId> <!-- version from hibernate 2.1.8 --> <version>h2.1.8</version> </dependency> <dependency> <groupId>jta</groupId> <artifactId>jta</artifactId> <!-- version from hibernate 2.1.8 --> <version>h2.1.8</version> </dependency> <dependency> <groupId>odmg</groupId> <artifactId>odmg</artifactId> <version>3.0</version> </dependency> <dependency> <groupId>xalan</groupId> <artifactId>xalan</artifactId> <version>2.6.0</version> </dependency> <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.6.2</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-id</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-thread_local</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-component</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-components-loader</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-db</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-log-configure</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-request</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-tool-registration</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-tool</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-active-tool</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-session</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-function</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-authentication</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-common-uuid-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-common-manager-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-common-type-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-common-superstructure-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-common-registry-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-common-edu-person-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-common-authorization-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-common-agent-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-legacy-bundle</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-jgroups</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-legacy-service</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-metaobj-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>jdom</groupId> <artifactId>jdom</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-common-composite-component-data</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-present-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>OKI</groupId> <artifactId>OkiOSID</artifactId> <version>2.0</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-profile-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-profile-component-shared</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-roster-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-roster-component-shared</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-syllabus-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-syllabus-component-shared</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-help-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-comp-shared-help</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-scheduler-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-comp-shared-scheduler</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>quartz</groupId> <artifactId>quartz</artifactId> <version>1.5.1</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-sections-api</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-sections-comp-shared-data-sakai21</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-rwiki-service</artifactId> <version>${sakai.version}</version> </dependency> <dependency> <groupId>sakaiproject</groupId> <artifactId>sakai-rwiki-model</artifactId> <version>${sakai.version}</version> </dependency> </dependencies> <developers> <developer> <id>jholtzman</id> <name>Josh Holtzman</name> <email>jholtzman@berkeley.edu</email> <organization>UC Berkeley</organization> <organizationUrl>http://media.berkeley.edy</organizationUrl> <roles> <role>Lead Developer</role> </roles> <timezone>-8</timezone> </developer> </developers> <reports /> <build> <sourceDirectory>src/java</sourceDirectory> <resources> <resource> <directory>src/conf</directory> <includes> <include>log4j.properties</include> </includes> </resource> </resources> <unitTestSourceDirectory>src/test</unitTestSourceDirectory> <unitTest> <includes> <!-- Include the full integration test. Running all test cases at once allows us to reuse the sakai component manager for all tests. --> <include>**/SakaiIntegrationTest.java</include> <!-- Incluse only specific tests (list them here) --> <!-- include>**/DbAnnouncementServiceTest.java</include --> </includes> </unitTest> <nagEmailAddress>jholtzman@berkeley.edu</nagEmailAddress> </build> </project>
- test-harness --> project.xml