Created
October 13, 2011 12:41
-
-
Save jesperronn/1284139 to your computer and use it in GitHub Desktop.
Separate all tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.company</groupId> | |
| <artifactId>backend-project</artifactId> | |
| <packaging>jar</packaging> | |
| <name>backend-project</name> | |
| <version>2.1.12-SNAPSHOT</version> | |
| <parent> | |
| <artifactId>myproject</artifactId> | |
| <groupId>com.company</groupId> | |
| <version>2.1.12-SNAPSHOT</version> | |
| </parent> | |
| <url /> | |
| <properties> | |
| <build.number>${BUILD_NUMBER}</build.number> | |
| <build.id>${BUILD_ID}</build.id> | |
| <job.name>${JOB_NAME}</job.name> | |
| <build.tag>${BUILD_TAG}</build.tag> | |
| <executor.number>${EXECUTOR_NUMBER}</executor.number> | |
| <workspace>${WORKSPACE}</workspace> | |
| <svn.revision>${SVN_REVISION}</svn.revision> | |
| <spring.version>3.1.0.M1</spring.version> | |
| </properties> | |
| <dependencies> | |
| <!-- company dependencies below: --> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>commons-tools</artifactId> | |
| <version>${commons-tools.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>legacy_client</artifactId> | |
| <version>${legacyclient.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-project</artifactId> | |
| <version>${onefpt.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-project</artifactId> | |
| <version>${onefpt.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-objects</artifactId> | |
| <version>${common-objects.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-objects</artifactId> | |
| <version>${common-objects.version}</version> | |
| </dependency> | |
| <!-- end company dependencies --> | |
| <dependency> | |
| <groupId>log4j</groupId> | |
| <artifactId>log4j</artifactId> | |
| <version>1.2.16</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>commons-logging</groupId> | |
| <artifactId>commons-logging</artifactId> | |
| <version>1.1.1</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>commons-lang</groupId> | |
| <artifactId>commons-lang</artifactId> | |
| <version>2.3</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>commons-collections</groupId> | |
| <artifactId>commons-collections</artifactId> | |
| <version>3.2.1</version> | |
| </dependency> | |
| <!-- test dependencies below --> | |
| <dependency> | |
| <groupId>org.mockito</groupId> | |
| <artifactId>mockito-all</artifactId> | |
| <version>${mockito.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.hamcrest</groupId> | |
| <artifactId>hamcrest-all</artifactId> | |
| <version>${hamcrest.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>junit</groupId> | |
| <artifactId>junit</artifactId> | |
| <version>${junit.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.googlecode.lambdaj</groupId> | |
| <artifactId>lambdaj</artifactId> | |
| <version>${lambdaj.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <!-- end test dependencies --> | |
| </dependencies> | |
| <build> | |
| <finalName>backend-project</finalName> | |
| <resources> | |
| <resource> | |
| <directory>src/main/resources</directory> | |
| <includes> | |
| <include>**/*.*</include> | |
| </includes> | |
| </resource> | |
| </resources> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-compiler-plugin</artifactId> | |
| <configuration> | |
| <source>${compiler.version}</source> | |
| <target>${compiler.version}</target> | |
| </configuration> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-surefire-plugin</artifactId> | |
| <configuration> | |
| <additionalClasspathElements> | |
| <additionalClasspathElement>${basedir}/src/main/webapp/WEB-INF</additionalClasspathElement> | |
| </additionalClasspathElements> | |
| <systemProperties> | |
| <systemProperty> | |
| <name>HOSTED_MODE</name> | |
| <value>DUMMY</value> | |
| </systemProperty> | |
| </systemProperties> | |
| </configuration> | |
| </plugin> | |
| <plugin> | |
| <!-- create test-jar which can be used for other projects (frontend project)--> | |
| <artifactId>maven-jar-plugin</artifactId> | |
| <executions> | |
| <execution> | |
| <goals> | |
| <goal>test-jar</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| </plugins> | |
| </build> | |
| </project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.company; | |
| import org.junit.runner.RunWith; | |
| import org.junit.runners.Suite; | |
| /** | |
| * User: Jesper Ronn-Jensen | |
| * Last updated Date: 21/09/11 | |
| * Last updated Time: 09:42 | |
| * | |
| * DO NOT EDIT! AUTO GENERATED FILE! | |
| * | |
| * update instructions found in | |
| * | |
| * scripts/update-test-suites.bat | |
| * | |
| */ | |
| @RunWith(Suite.class) | |
| @Suite.SuiteClasses( { | |
| //DO NOT EDIT!! AUTOGENERATED LIST! | |
| com.company.myproject.backend.Test1.class, | |
| com.company.myproject.backend.Test2.class | |
| //... | |
| //end autogenerated list | |
| }) | |
| public class AllBackendTests { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.company; | |
| import org.junit.runner.RunWith; | |
| import org.junit.runners.Suite; | |
| /** | |
| * User: Jesper Ronn-Jensen | |
| * Last updated Date: 21/09/11 | |
| * Last updated Time: 09:42 | |
| * | |
| * DO NOT EDIT! AUTO GENERATED FILE! | |
| * | |
| * update instructions found in | |
| * | |
| * scripts/update-test-suites.bat | |
| * | |
| */ | |
| @RunWith(Suite.class) | |
| @Suite.SuiteClasses( { | |
| //DO NOT EDIT!! AUTOGENERATED LIST! | |
| com.company.myproject.frontend.Test1.class, | |
| com.company.myproject.frontend.Test2.class | |
| //... | |
| //end autogenerated list | |
| }) | |
| public class AllFrontendTests { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.company.myproject</groupId> | |
| <artifactId>common-project</artifactId> | |
| <description> | |
| Common Layer between backend-project and frontend-project | |
| </description> | |
| <packaging>jar</packaging> | |
| <name>common-project</name> | |
| <version>2.1.12-SNAPSHOT</version> | |
| <parent> | |
| <artifactId>myproject</artifactId> | |
| <groupId>com.company.myproject</groupId> | |
| <version>2.1.12-SNAPSHOT</version> | |
| </parent> | |
| <url /> | |
| <!-- More Project Information --> | |
| <inceptionYear>2011</inceptionYear> | |
| <licenses /> | |
| <organization /> | |
| <developers /> | |
| <contributors /> | |
| <!-- Environment Settings --> | |
| <ciManagement /> | |
| <mailingLists /> | |
| <prerequisites /> | |
| <issueManagement /> | |
| </scm> | |
| <dependencies> | |
| <!-- nordea dependencies below: --> | |
| <dependency> | |
| <groupId>com.google.gwt</groupId> | |
| <artifactId>gwt-user</artifactId> | |
| <version>${gwt.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>commons-tools</artifactId> | |
| <version>${commons-tools.version}</version> | |
| </dependency> | |
| <dependency> | |
| <!--test classes from common-objects. Note: no tests from common-gwt-gui are added (not yet necessary)--> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-objects</artifactId> | |
| <version>${common-objects.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-objects</artifactId> | |
| <version>${common-objects.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <!-- end nordea dependencies --> | |
| <!-- test dependencies below --> | |
| <dependency> | |
| <groupId>org.mockito</groupId> | |
| <artifactId>mockito-all</artifactId> | |
| <version>${mockito.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.hamcrest</groupId> | |
| <artifactId>hamcrest-all</artifactId> | |
| <version>${hamcrest.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>junit</groupId> | |
| <artifactId>junit</artifactId> | |
| <version>${junit.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.googlecode.lambdaj</groupId> | |
| <artifactId>lambdaj</artifactId> | |
| <version>${lambdaj.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <!-- end test dependencies --> | |
| </dependencies> | |
| <build> | |
| <resources> | |
| <resource> | |
| <directory>src/main/resources</directory> | |
| <includes> | |
| <include>**/*.xml</include> | |
| </includes> | |
| </resource> | |
| <resource> | |
| <directory>src/main/java</directory> | |
| <excludes> | |
| <exclude>**/*.java</exclude> | |
| </excludes> | |
| </resource> | |
| </resources> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.codehaus.mojo</groupId> | |
| <artifactId>gwt-maven-plugin</artifactId> | |
| <version>${gwt.maven.version}</version> | |
| <executions> | |
| <execution> | |
| <goals> | |
| <goal>resources</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-compiler-plugin</artifactId> | |
| <configuration> | |
| <source>${compiler.version}</source> | |
| <target>${compiler.version}</target> | |
| </configuration> | |
| </plugin> | |
| <plugin> | |
| <!-- create test-jar which can be used for other projects (frontend project)--> | |
| <artifactId>maven-jar-plugin</artifactId> | |
| <executions> | |
| <execution> | |
| <goals> | |
| <goal>test-jar</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| </plugins> | |
| <extensions> | |
| <extension> | |
| <groupId>org.apache.maven.wagon</groupId> | |
| <artifactId>wagon-webdav</artifactId> | |
| <version>1.0-beta-2</version> | |
| </extension> | |
| </extensions> | |
| </build> | |
| </project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.company; | |
| import org.junit.runner.RunWith; | |
| import org.junit.runners.Suite; | |
| /** | |
| * User: Jesper Ronn-Jensen | |
| * Last updated Date: 21/09/11 | |
| * Last updated Time: 09:42 | |
| * | |
| * DO NOT EDIT! AUTO GENERATED FILE! | |
| * | |
| * update instructions found in | |
| * | |
| * scripts/update-test-suites.bat | |
| * | |
| */ | |
| @RunWith(Suite.class) | |
| @Suite.SuiteClasses( { | |
| //DO NOT EDIT!! AUTOGENERATED LIST! | |
| com.company.myproject.shared.Test1.class, | |
| com.company.myproject.shared.Test2.class | |
| //... | |
| //end autogenerated list | |
| }) | |
| public class AllCommonTests { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <!-- The Basics --> | |
| <groupId>com.company</groupId> | |
| <artifactId>frontend-project</artifactId> | |
| <version>2.1.12-SNAPSHOT</version> | |
| <packaging>war</packaging> | |
| <dependencyManagement /> | |
| <modules /> | |
| <parent> | |
| <artifactId>myproject</artifactId> | |
| <groupId>com.company</groupId> | |
| <version>2.1.12-SNAPSHOT</version> | |
| </parent> | |
| <!-- More Project Information --> | |
| <name>frontend-project</name> | |
| <description /> | |
| <url /> | |
| <inceptionYear /> | |
| <licenses /> | |
| <organization /> | |
| <developers /> | |
| <contributors /> | |
| <!-- Environment Settings --> | |
| <issueManagement /> | |
| <ciManagement /> | |
| <mailingLists /> | |
| <scm /> | |
| <prerequisites /> | |
| <dependencies> | |
| <dependency> | |
| <groupId>com.kiouri.sliderbar</groupId> | |
| <artifactId>gwt-slider-bar</artifactId> | |
| <version>1.0</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>javax.jms</groupId> | |
| <artifactId>jms</artifactId> | |
| <version>1.1</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.springframework</groupId> | |
| <artifactId>org.springframework.jms</artifactId> | |
| <version>${spring.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.apache.activemq</groupId> | |
| <artifactId>activemq-core</artifactId> | |
| <version>4.1.2</version> | |
| <scope>runtime</scope> | |
| </dependency> | |
| <!-- company dependencies below: --> | |
| <dependency> | |
| <groupId>com.gwtplatform</groupId> | |
| <artifactId>gwtp-dispatch-client</artifactId> | |
| <version>${gwtp.version}</version> | |
| <scope>provided</scope> <!-- Remove for GWTP 0.5.1 and earlier --> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.gwtplatform</groupId> | |
| <artifactId>gwtp-dispatch-server-spring</artifactId> | |
| <version>${gwtp.version}</version> | |
| <exclusions> | |
| <exclusion> | |
| <groupId>org.springframework</groupId> | |
| <artifactId>spring-core</artifactId> | |
| </exclusion> | |
| <exclusion> | |
| <groupId>org.springframework</groupId> | |
| <artifactId>spring-context</artifactId> | |
| </exclusion> | |
| <exclusion> | |
| <groupId>org.springframework</groupId> | |
| <artifactId>spring-beans</artifactId> | |
| </exclusion> | |
| <exclusion> | |
| <groupId>org.springframework</groupId> | |
| <artifactId>spring-web</artifactId> | |
| </exclusion> | |
| </exclusions> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>commons-tools</artifactId> | |
| <version>${commons-tools.version}</version> | |
| <exclusions> | |
| <exclusion> | |
| <groupId>org.springframework</groupId> | |
| <artifactId>spring</artifactId> | |
| </exclusion> | |
| </exclusions> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-gwt-gui</artifactId> | |
| <version>${common-gwt-gui.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-gwt-gui</artifactId> | |
| <version>${common-gwt-gui.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-project</artifactId> | |
| <version>${onefpt.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-project</artifactId> | |
| <version>${onefpt.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-objects</artifactId> | |
| <version>${common-objects.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-objects</artifactId> | |
| <version>${common-objects.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>backend-project</artifactId> | |
| <version>${onefpt.version}</version> | |
| </dependency> | |
| <!-- end company dependencies --> | |
| <dependency> | |
| <groupId>com.google.gwt</groupId> | |
| <artifactId>gwt-dev</artifactId> | |
| <version>${gwt.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>commons-collections</groupId> | |
| <artifactId>commons-collections</artifactId> | |
| <version>3.2.1</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.google.gwt</groupId> | |
| <artifactId>gwt-canvas</artifactId> | |
| <version>0.4.0</version> | |
| <scope>compile</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>log4j</groupId> | |
| <artifactId>log4j</artifactId> | |
| <version>1.2.16</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>commons-logging</groupId> | |
| <artifactId>commons-logging</artifactId> | |
| <version>1.1.1</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.mortbay.jetty</groupId> | |
| <artifactId>jetty-naming</artifactId> | |
| <version>6.1.1</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.mortbay.jetty</groupId> | |
| <artifactId>jetty-plus</artifactId> | |
| <version>6.1.1</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <!-- test dependencies below --> | |
| <dependency> | |
| <groupId>org.mockito</groupId> | |
| <artifactId>mockito-all</artifactId> | |
| <version>${mockito.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.hamcrest</groupId> | |
| <artifactId>hamcrest-all</artifactId> | |
| <version>${hamcrest.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>junit</groupId> | |
| <artifactId>junit</artifactId> | |
| <version>${junit.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.googlecode.lambdaj</groupId> | |
| <artifactId>lambdaj</artifactId> | |
| <version>${lambdaj.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| </dependencies> | |
| <!-- end test dependencies --> | |
| <!-- Build Settings --> | |
| <build> | |
| <defaultGoal>install</defaultGoal> | |
| <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory> | |
| <resources> | |
| <resource> | |
| <directory>src/main/java</directory> | |
| <excludes> | |
| <exclude>*.java</exclude> | |
| </excludes> | |
| </resource> | |
| <resource> | |
| <directory>src/main/resources</directory> | |
| <includes> | |
| <include>**</include> | |
| </includes> | |
| <filtering>true</filtering> | |
| </resource> | |
| </resources> | |
| </build> | |
| </project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| IF EXIST jruby-complete-1.6.4.jar ( | |
| java -jar jruby-complete-1.6.4.jar update-test-suites.rb | |
| ) else ( | |
| echo +-----------------------------------------------------------------------------------+ | |
| echo + FATAL ERROR: You need to put jruby-complete-1.6.4.jar into this directory! + | |
| echo + + | |
| echo + + | |
| echo + Download URL: + | |
| echo + http://jruby.org.s3.amazonaws.com/downloads/1.6.4/jruby-complete-1.6.4.jar + | |
| echo + http://jruby.org/download + | |
| echo + + | |
| echo +-----------------------------------------------------------------------------------+ | |
| ) | |
| pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # User: Jesper Ronn-Jensen | |
| # Date: 21/09/11 | |
| # Time: 09:42 | |
| # | |
| # Generator to update all test suites | |
| # | |
| # It currently updates the test suites written in the map just below (AllFrontendTests, etc.) | |
| # | |
| # To run this update, run the BAT file `update-test-suites.bat` in this folder. | |
| # | |
| # Note that this requires ruby or JRuby to run. The BAT file will tell you what to do and how to download | |
| # | |
| # | |
| projects = { | |
| :frontend => {:dir => "frontend-project/src/test/java", :file => "AllFrontendTests.txt", :classLocation=>"com/company", :className=>"AllFrontendTests"}, | |
| :backend => {:dir => "backend-project/src/test/java", :file => "AllBackendTests.txt", :classLocation=>"com/company", :className=>"AllBackendTests"}, | |
| :common_project => {:dir => "common-project/src/test/java", :file => "AllCommonProjectTests.txt", :classLocation=>"com/company", :className=>"AllCommonTests"}, | |
| :common_objects => {:dir => "common-objects/src/test/java", :file => "AllCommonObjectTests.txt", :classLocation=>"com/company", :className=>"AllCommonObjectTests"}, | |
| :common_gwt_gui => {:dir => "common-gwt-gui/src/test/java", :file => "AllCommonGwtGuiTests.txt", :classLocation=>"com/company", :className=>"AllCommonGwtGuiTests"} | |
| } | |
| #Class header variable starts here | |
| class_header = %Q[ | |
| package com.company; | |
| import org.junit.runner.RunWith; | |
| import org.junit.runners.Suite; | |
| /** | |
| * User: g43899 Jesper Ronn-Jensen | |
| * Last updated Date: 21/09/11 | |
| * Last updated Time: 09:42 | |
| * | |
| * DO NOT EDIT! AUTO GENERATED FILE! | |
| * | |
| * update instructions found in | |
| * | |
| * scripts/update-test-suites.bat | |
| * | |
| */ | |
| @RunWith(Suite.class) | |
| @Suite.SuiteClasses( { | |
| //DO NOT EDIT!! AUTOGENERATED LIST! | |
| ] | |
| #Class footer variable starts here | |
| class_footer = %Q[ | |
| //end autogenerated list | |
| }) | |
| public class ***ClassName*** { | |
| } | |
| ] | |
| Dir.chdir(".."); | |
| project_name = Dir.pwd # will save project folder name (like for instance "myproject") | |
| Dir.chdir(".."); | |
| orig_dir = Dir.pwd | |
| projects.each do |name, project| | |
| #Dir.chdir("frontend-project/src/test/java"); | |
| dirname = project[:dir].to_s | |
| puts "finding Test classes in #{Dir.pwd}..." | |
| Dir.chdir(dirname); | |
| files = Dir.glob('**/*Test.java'); | |
| out= files.collect{|x| x.gsub('java/', '').gsub('/', '.').gsub('.java', '.class')}.sort! | |
| #remove lines not under com.company package namespace | |
| out.reject!{|test| !test.include?("com.company")} | |
| puts "Found #{out.size} classes which is updated into #{project[:file]}" | |
| #File.open("AllFrontendTests.txt", "w") do |f| | |
| File.open(project[:file], "w") do |f| | |
| f.puts out.join(",\n"); | |
| end | |
| #save output also in our map in the top (use key :classfiles) | |
| project[:classfiles] = out | |
| Dir.chdir(orig_dir) | |
| end | |
| puts "\n\n\n" | |
| puts "currently in orig dir: #{Dir.pwd}" | |
| projects.each do |name, project| | |
| break unless project[:className] | |
| dirname = project[:dir].to_s | |
| puts "Updating Test file in #{Dir.pwd} #{dirname}:" | |
| Dir.chdir(dirname); | |
| # File.open("AllFrontendTests.txt", "w") do |f| | |
| # contents = [] | |
| # file = File.open(project[:file], "rb") do |f| | |
| # f.each_line do |line| | |
| # contents << line | |
| # end | |
| # end | |
| classFileLoc = "#{project[:classLocation]}/#{project[:className]}.java" | |
| if (File.exists?(classFileLoc)) | |
| puts "class file exists :)" | |
| else | |
| puts "class file not found :(. Expected location:\n #{classFileLoc}\n(current location: #{Dir.pwd})" | |
| end | |
| foot_str = class_footer.gsub("***ClassName***", project[:className]); | |
| indent = " "; | |
| File.open("#{project[:classLocation]}/#{project[:className]}.java", "w+") do |f| | |
| f.puts class_header; | |
| f.puts indent + project[:classfiles].join(",\n" + indent); | |
| f.puts foot_str | |
| end | |
| Dir.chdir(orig_dir) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com; | |
| import com.company.*; | |
| import org.junit.runner.RunWith; | |
| import org.junit.runners.Suite; | |
| /** | |
| * | |
| * overall test suite to run all onefpt related tests | |
| * | |
| * | |
| * | |
| * | |
| * This file is based on individual test suites for each submodule. | |
| * The submodule test suites are automatically generated by a script to include all test files | |
| * | |
| * This test file is useful, since you can set up your IDE to run this test with coverage | |
| * Eclipse users can use EclEmma plugin http://www.eclemma.org/, | |
| * IntelliJ users will run this file, then save it as a configuration (Run>Edit Configuration) | |
| * Remember to "Record code coverage", and you are all set. | |
| * | |
| * @see /onepft/scripts/update-tests-suites.bat for information on how to | |
| * update the test suites with newly added or renamed tests. | |
| */ | |
| @RunWith(Suite.class) | |
| @Suite.SuiteClasses( { | |
| AllBackendTests.class, | |
| AllFrontendTests.class, | |
| AllCommonProjectTests.class, | |
| AllCommonObjectTests.class, | |
| AllCommonGwtGuiTests.class | |
| }) | |
| public class AllTests { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <parent> | |
| <artifactId>CompanyProject</artifactId> | |
| <groupId>com.company.myproject</groupId> | |
| <version>2.1.12-SNAPSHOT</version> | |
| </parent> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.company.myproject</groupId> | |
| <artifactId>myproject-test</artifactId> | |
| <packaging>pom</packaging> | |
| <version>2.1.12-SNAPSHOT</version> | |
| <name>myproject-test</name> | |
| <description> | |
| Project that depends on all other submodules in order to allow one single test suite | |
| </description> | |
| <!-- convenience to define versions in one place --> | |
| <dependencies> | |
| <!-- internal company dependencies --> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>commons-tools</artifactId> | |
| <version>${commons-tools.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-gwt-gui</artifactId> | |
| <version>${common-gwt-gui.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-gwt-gui</artifactId> | |
| <version>${common-gwt-gui.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-objects</artifactId> | |
| <version>${common-objects.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company</groupId> | |
| <artifactId>common-objects</artifactId> | |
| <version>${common-objects.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company.myproject</groupId> | |
| <artifactId>common-project</artifactId> | |
| <version> ${onefpt.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company.myproject</groupId> | |
| <artifactId>common-project</artifactId> | |
| <version> ${onefpt.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company.myproject</groupId> | |
| <artifactId>frontend-project</artifactId> | |
| <version> ${onefpt.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company.myproject</groupId> | |
| <artifactId>frontend-project</artifactId> | |
| <version> ${onefpt.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company.myproject</groupId> | |
| <artifactId>backend-project</artifactId> | |
| <version> ${onefpt.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.company.myproject</groupId> | |
| <artifactId>backend-project</artifactId> | |
| <version> ${onefpt.version}</version> | |
| <type>test-jar</type> | |
| <scope>test</scope> | |
| </dependency> | |
| <!-- end company dependencies --> | |
| <!-- special GWT dependencies --> | |
| <dependency> | |
| <groupId>com.google.gwt</groupId> | |
| <artifactId>gwt-user</artifactId> | |
| <version>${gwt.version}</version> | |
| <scope>compile</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.google.gwt</groupId> | |
| <artifactId>gwt-servlet</artifactId> | |
| <version>${gwt.version}</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.google.gwt</groupId> | |
| <artifactId>gwt-dev</artifactId> | |
| <version>${gwt.version}</version> | |
| <scope>provided</scope> | |
| </dependency> | |
| <!-- special GWT dependencies --> | |
| <!-- test dependencies below --> | |
| <dependency> | |
| <groupId>org.mockito</groupId> | |
| <artifactId>mockito-all</artifactId> | |
| <version>${mockito.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.hamcrest</groupId> | |
| <artifactId>hamcrest-all</artifactId> | |
| <version>${hamcrest.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>junit</groupId> | |
| <artifactId>junit</artifactId> | |
| <version>${junit.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.googlecode.lambdaj</groupId> | |
| <artifactId>lambdaj</artifactId> | |
| <version>${lambdaj.version}</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <!-- end test dependencies --> | |
| </dependencies> | |
| </project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment