Commit a276973d22d68154c031b4d3a96ad73e7228ce01

Authored by Ahmed Owian
1 parent 03e3f2b2b6
Exists in master

Updated the permissions on run.sh

Fixed webapps names in run-wars execution of runner pom
skype-integration/run.sh 100644 → 100755
1 #!/bin/bash 1 #!/bin/bash
2 # Downloads the spring-loaded lib if not existing and runs the full all-in-one 2 # Downloads the spring-loaded lib if not existing and runs the full all-in-one
3 # (Alfresco + Share + Solr) using the runner project 3 # (Alfresco + Share + Solr) using the runner project
4 springloadedfile=~/.m2/repository/org/springframework/springloaded/1.2.3.RELEASE/springloaded-1.2.3.RELEASE.jar 4 springloadedfile=~/.m2/repository/org/springframework/springloaded/1.2.3.RELEASE/springloaded-1.2.3.RELEASE.jar
5 5
6 if [ ! -f $springloadedfile ]; then 6 if [ ! -f $springloadedfile ]; then
7 mvn validate -Psetup 7 mvn validate -Psetup
8 fi 8 fi
9 MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn clean install -Prun 9 MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn clean install -Prun
skype-integration/runner/pom.xml
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <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"> 2 <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">
3 <modelVersion>4.0.0</modelVersion> 3 <modelVersion>4.0.0</modelVersion>
4 <artifactId>skype-integration-runner</artifactId> 4 <artifactId>skype-integration-runner</artifactId>
5 <name>Alfresco, Share and Solr4 Tomcat Runner</name> 5 <name>Alfresco, Share and Solr4 Tomcat Runner</name>
6 <packaging>pom</packaging> 6 <packaging>pom</packaging>
7 <description>Alfresco, Share and Solr4 Tomcat Runner</description> 7 <description>Alfresco, Share and Solr4 Tomcat Runner</description>
8 8
9 <parent> 9 <parent>
10 <groupId>org.alfresco.skype</groupId> 10 <groupId>org.alfresco.skype</groupId>
11 <artifactId>skype-integration-parent</artifactId> 11 <artifactId>skype-integration-parent</artifactId>
12 <version>1.0-SNAPSHOT</version> 12 <version>1.0-SNAPSHOT</version>
13 </parent> 13 </parent>
14 14
15 <profiles> 15 <profiles>
16 <profile> 16 <profile>
17 <id>run</id> 17 <id>run</id>
18 18
19 <!-- TODO: figure out a way to define these properties in a parent POM, they are now also duplicated 19 <!-- TODO: figure out a way to define these properties in a parent POM, they are now also duplicated
20 in the solr-config/pom.xml --> 20 in the solr-config/pom.xml -->
21 <properties> 21 <properties>
22 <alfresco.solr.dir>${alfresco.data.location}/solr4</alfresco.solr.dir> 22 <alfresco.solr.dir>${alfresco.data.location}/solr4</alfresco.solr.dir>
23 <alfresco.solr.home.dir>${alfresco.solr.dir}/config</alfresco.solr.home.dir> 23 <alfresco.solr.home.dir>${alfresco.solr.dir}/config</alfresco.solr.home.dir>
24 <alfresco.solr.data.dir>${alfresco.solr.dir}/data</alfresco.solr.data.dir> 24 <alfresco.solr.data.dir>${alfresco.solr.dir}/data</alfresco.solr.data.dir>
25 </properties> 25 </properties>
26 26
27 <build> 27 <build>
28 <plugins> 28 <plugins>
29 <!-- Copy and filter webapp context files - output dir is runner/target/contexts --> 29 <!-- Copy and filter webapp context files - output dir is runner/target/contexts -->
30 <plugin> 30 <plugin>
31 <groupId>org.apache.maven.plugins</groupId> 31 <groupId>org.apache.maven.plugins</groupId>
32 <artifactId>maven-resources-plugin</artifactId> 32 <artifactId>maven-resources-plugin</artifactId>
33 <executions> 33 <executions>
34 <execution> 34 <execution>
35 <id>copy-tomcat-resources</id> 35 <id>copy-tomcat-resources</id>
36 <phase>prepare-package</phase> 36 <phase>prepare-package</phase>
37 <goals> 37 <goals>
38 <goal>copy-resources</goal> 38 <goal>copy-resources</goal>
39 </goals> 39 </goals>
40 <configuration> 40 <configuration>
41 <outputDirectory>${project.build.directory}/contexts</outputDirectory> 41 <outputDirectory>${project.build.directory}/contexts</outputDirectory>
42 <resources> 42 <resources>
43 <resource> 43 <resource>
44 <directory>tomcat</directory> 44 <directory>tomcat</directory>
45 <filtering>true</filtering> 45 <filtering>true</filtering>
46 </resource> 46 </resource>
47 </resources> 47 </resources>
48 </configuration> 48 </configuration>
49 </execution> 49 </execution>
50 </executions> 50 </executions>
51 </plugin> 51 </plugin>
52 52
53 <!-- Run Tomcat 7 embedded with Alfresco.war and Share.war contexts. 53 <!-- Run Tomcat 7 embedded with Alfresco.war and Share.war contexts.
54 The solr4.war is fetched directly from the Maven repo, it is not built like the other WARs. 54 The solr4.war is fetched directly from the Maven repo, it is not built like the other WARs.
55 Plugin version is picked up from alfresco-sdk-parent.pom pluginManagement definition, 55 Plugin version is picked up from alfresco-sdk-parent.pom pluginManagement definition,
56 which also brings in the H2 database lib --> 56 which also brings in the H2 database lib -->
57 <plugin> 57 <plugin>
58 <groupId>org.apache.tomcat.maven</groupId> 58 <groupId>org.apache.tomcat.maven</groupId>
59 <artifactId>tomcat7-maven-plugin</artifactId> 59 <artifactId>tomcat7-maven-plugin</artifactId>
60 <executions> 60 <executions>
61 <execution> 61 <execution>
62 <id>run-wars</id> 62 <id>run-wars</id>
63 <goals> 63 <goals>
64 <goal>run</goal> 64 <goal>run</goal>
65 </goals> 65 </goals>
66 <phase>pre-integration-test</phase> 66 <phase>pre-integration-test</phase>
67 </execution> 67 </execution>
68 </executions> 68 </executions>
69 <configuration> 69 <configuration>
70 <ignorePackaging>true</ignorePackaging> 70 <ignorePackaging>true</ignorePackaging>
71 <!-- Make sure Catalina classes are picked up when we got virtual webapp contexts with classpaths --> 71 <!-- Make sure Catalina classes are picked up when we got virtual webapp contexts with classpaths -->
72 <useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader> 72 <useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
73 <path>/</path> 73 <path>/</path>
74 <systemProperties> 74 <systemProperties>
75 <solr.solr.home>${alfresco.solr.home.dir}</solr.solr.home> 75 <solr.solr.home>${alfresco.solr.home.dir}</solr.solr.home>
76 </systemProperties> 76 </systemProperties>
77 <!-- Should this class loader delegate to the parent class loader before searching its 77 <!-- Should this class loader delegate to the parent class loader before searching its
78 own repositories (i.e. the usual Java2 delegation model) --> 78 own repositories (i.e. the usual Java2 delegation model) -->
79 <!-- Prevent parent classloader delegation, each webapp loads. 79 <!-- Prevent parent classloader delegation, each webapp loads.
80 If set to true then you will get a truckload of Solr logging as 80 If set to true then you will get a truckload of Solr logging as
81 the alf_data_dev/solr4/config/log4j-solr.properties file is not picked up. 81 the alf_data_dev/solr4/config/log4j-solr.properties file is not picked up.
82 This also fixes issues with the Google Guava Library, which this tomcat plugin uses 82 This also fixes issues with the Google Guava Library, which this tomcat plugin uses
83 version 10.0.1 of but Solr uses 14.0.1 --> 83 version 10.0.1 of but Solr uses 14.0.1 -->
84 <delegate>false</delegate> 84 <delegate>false</delegate>
85 <webapps> 85 <webapps>
86 <webapp> 86 <webapp>
87 <groupId>${project.groupId}</groupId> 87 <groupId>${project.groupId}</groupId>
88 <artifactId>repo</artifactId> 88 <artifactId>skype-integration-repo</artifactId>
89 <version>${project.version}</version> 89 <version>${project.version}</version>
90 <type>war</type> 90 <type>war</type>
91 <!-- Make sure webapp is loaded with context and everything, 91 <!-- Make sure webapp is loaded with context and everything,
92 if set to 'false' then you will get 404 when trying to access the webapp from browser --> 92 if set to 'false' then you will get 404 when trying to access the webapp from browser -->
93 <asWebapp>true</asWebapp> 93 <asWebapp>true</asWebapp>
94 <contextPath>/alfresco</contextPath> 94 <contextPath>/alfresco</contextPath>
95 <contextFile>${project.build.directory}/contexts/context-repo.xml</contextFile> 95 <contextFile>${project.build.directory}/contexts/context-repo.xml</contextFile>
96 </webapp> 96 </webapp>
97 <webapp> 97 <webapp>
98 <groupId>${project.groupId}</groupId> 98 <groupId>${project.groupId}</groupId>
99 <artifactId>share</artifactId> 99 <artifactId>skype-integration-share</artifactId>
100 <version>${project.version}</version> 100 <version>${project.version}</version>
101 <type>war</type> 101 <type>war</type>
102 <asWebapp>true</asWebapp> 102 <asWebapp>true</asWebapp>
103 <contextPath>/share</contextPath> 103 <contextPath>/share</contextPath>
104 <contextFile>${project.build.directory}/contexts/context-share.xml</contextFile> 104 <contextFile>${project.build.directory}/contexts/context-share.xml</contextFile>
105 </webapp> 105 </webapp>
106 <webapp> 106 <webapp>
107 <groupId>${alfresco.groupId}</groupId> 107 <groupId>${alfresco.groupId}</groupId>
108 <artifactId>alfresco-solr4</artifactId> 108 <artifactId>alfresco-solr4</artifactId>
109 <version>${alfresco.version}</version> 109 <version>${alfresco.version}</version>
110 <type>war</type> 110 <type>war</type>
111 <asWebapp>true</asWebapp> 111 <asWebapp>true</asWebapp>
112 <contextPath>/solr4</contextPath> 112 <contextPath>/solr4</contextPath>
113 <contextFile>${project.build.directory}/contexts/context-solr.xml</contextFile> 113 <contextFile>${project.build.directory}/contexts/context-solr.xml</contextFile>
114 </webapp> 114 </webapp>
115 </webapps> 115 </webapps>
116 </configuration> 116 </configuration>
117 </plugin> 117 </plugin>
118 </plugins> 118 </plugins>
119 </build> 119 </build>
120 </profile> 120 </profile>
121 121
122 <!-- Runs Share User Interface regression tests using Alfresco Share PO (Page Object) vanilla Selenium / Webdrone (WebDriver wrapper). 122 <!-- Runs Share User Interface regression tests using Alfresco Share PO (Page Object) vanilla Selenium / Webdrone (WebDriver wrapper).
123 NOTE: Assumes an already running Alfresco + Share at the default location ${share.client.url} 123 NOTE: Assumes an already running Alfresco + Share at the default location ${share.client.url}
124 (e.g. by invoking: 124 (e.g. by invoking:
125 $ mvn clean install -Prun,regression-testing 125 $ mvn clean install -Prun,regression-testing
126 to run a specific test do: 126 to run a specific test do:
127 $ mvn clean install -Prun,regression-testing -Dit.test=LoginPageTest 127 $ mvn clean install -Prun,regression-testing -Dit.test=LoginPageTest
128 --> 128 -->
129 <profile> 129 <profile>
130 <id>regression-testing</id> 130 <id>regression-testing</id>
131 <properties> 131 <properties>
132 <!-- Re-configure Tomcat 7 Plugin (see run profile) to fork so we can run tests in parallel --> 132 <!-- Re-configure Tomcat 7 Plugin (see run profile) to fork so we can run tests in parallel -->
133 <!-- Note. the fork option does not fork a new JVM. Rather it is run in a thread created by the 133 <!-- Note. the fork option does not fork a new JVM. Rather it is run in a thread created by the
134 Maven Launcher class (org.codehaus.plexus.classworlds.launcher.Launcher) that is invoked by the mvn command. --> 134 Maven Launcher class (org.codehaus.plexus.classworlds.launcher.Launcher) that is invoked by the mvn command. -->
135 <maven.tomcat.fork>true</maven.tomcat.fork> 135 <maven.tomcat.fork>true</maven.tomcat.fork>
136 136
137 <!-- Make sure we are actually testing something --> 137 <!-- Make sure we are actually testing something -->
138 <skipTests>false</skipTests> 138 <skipTests>false</skipTests>
139 </properties> 139 </properties>
140 <build> 140 <build>
141 <plugins> 141 <plugins>
142 <!-- Need to unpack the tests becuase of Jiras: --> 142 <!-- Need to unpack the tests becuase of Jiras: -->
143 <!-- https://jira.codehaus.org/browse/SUREFIRE-997 --> 143 <!-- https://jira.codehaus.org/browse/SUREFIRE-997 -->
144 <!-- https://jira.codehaus.org/browse/SUREFIRE-1024 --> 144 <!-- https://jira.codehaus.org/browse/SUREFIRE-1024 -->
145 <!-- Workaround for classloading issue in share-po (need to unpack it)--> 145 <!-- Workaround for classloading issue in share-po (need to unpack it)-->
146 <plugin> 146 <plugin>
147 <groupId>org.apache.maven.plugins</groupId> 147 <groupId>org.apache.maven.plugins</groupId>
148 <artifactId>maven-dependency-plugin</artifactId> 148 <artifactId>maven-dependency-plugin</artifactId>
149 <executions> 149 <executions>
150 <execution> 150 <execution>
151 <id>prepare-regression-test-resources</id> 151 <id>prepare-regression-test-resources</id>
152 <phase>pre-integration-test</phase> 152 <phase>pre-integration-test</phase>
153 <goals> 153 <goals>
154 <goal>unpack</goal> 154 <goal>unpack</goal>
155 </goals> 155 </goals>
156 <configuration> 156 <configuration>
157 <artifact>${alfresco.groupId}:share-po:${alfresco.version}:jar:tests</artifact> 157 <artifact>${alfresco.groupId}:share-po:${alfresco.version}:jar:tests</artifact>
158 <outputDirectory>${project.build.directory}/testng-resources</outputDirectory> 158 <outputDirectory>${project.build.directory}/testng-resources</outputDirectory>
159 </configuration> 159 </configuration>
160 </execution> 160 </execution>
161 </executions> 161 </executions>
162 </plugin> 162 </plugin>
163 163
164 <plugin> 164 <plugin>
165 <groupId>org.apache.maven.plugins</groupId> 165 <groupId>org.apache.maven.plugins</groupId>
166 <artifactId>maven-failsafe-plugin</artifactId> 166 <artifactId>maven-failsafe-plugin</artifactId>
167 <version>2.18.1</version> 167 <version>2.18.1</version>
168 <configuration> 168 <configuration>
169 <suiteXmlFiles> 169 <suiteXmlFiles>
170 <!-- Smaller test suite for Share, essential stuff like Login, Navigation, DocLib, and Search --> 170 <!-- Smaller test suite for Share, essential stuff like Login, Navigation, DocLib, and Search -->
171 <!-- Currently using our own config to be able to comment out one test class 171 <!-- Currently using our own config to be able to comment out one test class
172 <suiteXmlFile>${project.build.directory}/testng-resources/testng-alfresco-share.xml</suiteXmlFile> --> 172 <suiteXmlFile>${project.build.directory}/testng-resources/testng-alfresco-share.xml</suiteXmlFile> -->
173 <suiteXmlFile>${project.basedir}/test-ng/testng-alfresco-share.xml</suiteXmlFile> 173 <suiteXmlFile>${project.basedir}/test-ng/testng-alfresco-share.xml</suiteXmlFile>
174 </suiteXmlFiles> 174 </suiteXmlFiles>
175 <testClassesDirectory>${project.build.directory}/testng-resources</testClassesDirectory> 175 <testClassesDirectory>${project.build.directory}/testng-resources</testClassesDirectory>
176 <systemPropertyVariables> 176 <systemPropertyVariables>
177 <!-- Where is the Alfresco Share Webapp that we are testing --> 177 <!-- Where is the Alfresco Share Webapp that we are testing -->
178 <share.target>${share.client.url}</share.target> 178 <share.target>${share.client.url}</share.target>
179 </systemPropertyVariables> 179 </systemPropertyVariables>
180 180
181 <!-- The out-of-the-box Alfresco Share PO test classes does not follow the *IT.java 181 <!-- The out-of-the-box Alfresco Share PO test classes does not follow the *IT.java
182 naming convention, they use *Test.java, so need to add that --> 182 naming convention, they use *Test.java, so need to add that -->
183 <includes> 183 <includes>
184 <include>**/*Test.java</include> 184 <include>**/*Test.java</include>
185 </includes> 185 </includes>
186 </configuration> 186 </configuration>
187 <executions> 187 <executions>
188 <execution> 188 <execution>
189 <id>regression-tests</id> 189 <id>regression-tests</id>
190 <phase>integration-test</phase> 190 <phase>integration-test</phase>
191 <goals> 191 <goals>
192 <goal>integration-test</goal> 192 <goal>integration-test</goal>
193 </goals> 193 </goals>
194 </execution> 194 </execution>
195 <execution> 195 <execution>
196 <id>verify-tests</id> 196 <id>verify-tests</id>
197 <phase>verify</phase> 197 <phase>verify</phase>
198 <goals> 198 <goals>
199 <goal>verify</goal> 199 <goal>verify</goal>
200 </goals> 200 </goals>
201 </execution> 201 </execution>
202 </executions> 202 </executions>
203 </plugin> 203 </plugin>
204 204
205 </plugins> 205 </plugins>
206 </build> 206 </build>
207 207
208 <dependencies> 208 <dependencies>
209 <!-- Bring in the Share Page Objects (PO) used in the regression tests --> 209 <!-- Bring in the Share Page Objects (PO) used in the regression tests -->
210 <dependency> 210 <dependency>
211 <groupId>${alfresco.groupId}</groupId> 211 <groupId>${alfresco.groupId}</groupId>
212 <artifactId>share-po</artifactId> 212 <artifactId>share-po</artifactId>
213 <version>${alfresco.version}</version> 213 <version>${alfresco.version}</version>
214 <scope>test</scope> 214 <scope>test</scope>
215 215
216 <!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include 216 <!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
217 version 2.45 later on here in this profile --> 217 version 2.45 later on here in this profile -->
218 <exclusions> 218 <exclusions>
219 <exclusion> 219 <exclusion>
220 <groupId>org.seleniumhq.selenium</groupId> 220 <groupId>org.seleniumhq.selenium</groupId>
221 <artifactId>selenium-java</artifactId> 221 <artifactId>selenium-java</artifactId>
222 </exclusion> 222 </exclusion>
223 <exclusion> 223 <exclusion>
224 <groupId>org.seleniumhq.selenium</groupId> 224 <groupId>org.seleniumhq.selenium</groupId>
225 <artifactId>selenium-server</artifactId> 225 <artifactId>selenium-server</artifactId>
226 </exclusion> 226 </exclusion>
227 </exclusions> 227 </exclusions>
228 </dependency> 228 </dependency>
229 <!-- Bring in the Share Page Object (PO) regression tests that comes with Alfresco. 229 <!-- Bring in the Share Page Object (PO) regression tests that comes with Alfresco.
230 These tests cover the Alfresco Share Web Application --> 230 These tests cover the Alfresco Share Web Application -->
231 <dependency> 231 <dependency>
232 <groupId>${alfresco.groupId}</groupId> 232 <groupId>${alfresco.groupId}</groupId>
233 <artifactId>share-po</artifactId> 233 <artifactId>share-po</artifactId>
234 <version>${alfresco.version}</version> 234 <version>${alfresco.version}</version>
235 <classifier>tests</classifier> 235 <classifier>tests</classifier>
236 <scope>test</scope> 236 <scope>test</scope>
237 237
238 <!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include 238 <!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
239 version 2.45 later on here in this profile --> 239 version 2.45 later on here in this profile -->
240 <exclusions> 240 <exclusions>
241 <exclusion> 241 <exclusion>
242 <groupId>org.seleniumhq.selenium</groupId> 242 <groupId>org.seleniumhq.selenium</groupId>
243 <artifactId>selenium-java</artifactId> 243 <artifactId>selenium-java</artifactId>
244 </exclusion> 244 </exclusion>
245 <exclusion> 245 <exclusion>
246 <groupId>org.seleniumhq.selenium</groupId> 246 <groupId>org.seleniumhq.selenium</groupId>
247 <artifactId>selenium-server</artifactId> 247 <artifactId>selenium-server</artifactId>
248 </exclusion> 248 </exclusion>
249 </exclusions> 249 </exclusions>
250 </dependency> 250 </dependency>
251 251
252 <!-- Make sure we are running with newer selenium that works with newest FF (newer than 2.39.0) --> 252 <!-- Make sure we are running with newer selenium that works with newest FF (newer than 2.39.0) -->
253 <dependency> 253 <dependency>
254 <groupId>org.seleniumhq.selenium</groupId> 254 <groupId>org.seleniumhq.selenium</groupId>
255 <artifactId>selenium-java</artifactId> 255 <artifactId>selenium-java</artifactId>
256 <version>2.45.0-alfresco</version> 256 <version>2.45.0-alfresco</version>
257 </dependency> 257 </dependency>
258 <dependency> 258 <dependency>
259 <groupId>org.seleniumhq.selenium</groupId> 259 <groupId>org.seleniumhq.selenium</groupId>
260 <artifactId>selenium-server</artifactId> 260 <artifactId>selenium-server</artifactId>
261 <version>2.45.0-alfresco</version> 261 <version>2.45.0-alfresco</version>
262 <exclusions> 262 <exclusions>
263 <exclusion> 263 <exclusion>
264 <groupId>org.mortbay.jetty</groupId> 264 <groupId>org.mortbay.jetty</groupId>
265 <artifactId>servlet-api-2.5</artifactId> 265 <artifactId>servlet-api-2.5</artifactId>
266 </exclusion> 266 </exclusion>
267 </exclusions> 267 </exclusions>
268 </dependency> 268 </dependency>
269 269
270 <!-- Test NG is defined with test scope in share-po, so need it here too --> 270 <!-- Test NG is defined with test scope in share-po, so need it here too -->
271 <!-- Alfresco code creates a wrapper around Test NG --> 271 <!-- Alfresco code creates a wrapper around Test NG -->
272 <dependency> 272 <dependency>
273 <groupId>org.alfresco.test</groupId> 273 <groupId>org.alfresco.test</groupId>
274 <artifactId>alfresco-testng</artifactId> 274 <artifactId>alfresco-testng</artifactId>
275 <version>1.1</version> 275 <version>1.1</version>
276 <scope>test</scope> 276 <scope>test</scope>
277 <exclusions> 277 <exclusions>
278 <exclusion> 278 <exclusion>
279 <groupId>org.hamcrest</groupId> 279 <groupId>org.hamcrest</groupId>
280 <artifactId>hamcrest-core</artifactId> 280 <artifactId>hamcrest-core</artifactId>
281 </exclusion> 281 </exclusion>
282 </exclusions> 282 </exclusions>
283 </dependency> 283 </dependency>
284 </dependencies> 284 </dependencies>
285 </profile> 285 </profile>
286 286
287 <!-- Runs functional domain specific tests using Alfresco Share PO (Page Object) vanilla Selenium / Webdrone (WebDriver wrapper). 287 <!-- Runs functional domain specific tests using Alfresco Share PO (Page Object) vanilla Selenium / Webdrone (WebDriver wrapper).
288 NOTE: Assumes an already running Alfresco + Share at the default location ${share.client.url} 288 NOTE: Assumes an already running Alfresco + Share at the default location ${share.client.url}
289 (e.g. by invoking: 289 (e.g. by invoking:
290 $ mvn clean install -Prun,functional-testing 290 $ mvn clean install -Prun,functional-testing
291 to run a specific test do: 291 to run a specific test do:
292 $ mvn clean install -Prun,functional-testing -Dit.test=DemoPageTestIT 292 $ mvn clean install -Prun,functional-testing -Dit.test=DemoPageTestIT
293 --> 293 -->
294 <profile> 294 <profile>
295 <id>functional-testing</id> 295 <id>functional-testing</id>
296 <properties> 296 <properties>
297 <!-- Re-configure Tomcat 7 Plugin (see run profile) to fork so we can run tests in parallel --> 297 <!-- Re-configure Tomcat 7 Plugin (see run profile) to fork so we can run tests in parallel -->
298 <!-- Note. the fork option does not fork a new JVM. Rather it is run in a thread created by the 298 <!-- Note. the fork option does not fork a new JVM. Rather it is run in a thread created by the
299 Maven Launcher class (org.codehaus.plexus.classworlds.launcher.Launcher) that is invoked by the mvn command. --> 299 Maven Launcher class (org.codehaus.plexus.classworlds.launcher.Launcher) that is invoked by the mvn command. -->
300 <maven.tomcat.fork>true</maven.tomcat.fork> 300 <maven.tomcat.fork>true</maven.tomcat.fork>
301 </properties> 301 </properties>
302 <build> 302 <build>
303 <plugins> 303 <plugins>
304 <plugin> 304 <plugin>
305 <groupId>org.apache.maven.plugins</groupId> 305 <groupId>org.apache.maven.plugins</groupId>
306 <artifactId>maven-failsafe-plugin</artifactId> 306 <artifactId>maven-failsafe-plugin</artifactId>
307 <version>2.18.1</version> 307 <version>2.18.1</version>
308 <configuration> 308 <configuration>
309 <suiteXmlFiles> 309 <suiteXmlFiles>
310 <suiteXmlFile>${project.parent.basedir}/share-amp/target/test-classes/testng.xml</suiteXmlFile> 310 <suiteXmlFile>${project.parent.basedir}/share-amp/target/test-classes/testng.xml</suiteXmlFile>
311 </suiteXmlFiles> 311 </suiteXmlFiles>
312 <testClassesDirectory>${project.parent.basedir}/share-amp/target/test-classes</testClassesDirectory> 312 <testClassesDirectory>${project.parent.basedir}/share-amp/target/test-classes</testClassesDirectory>
313 <systemPropertyVariables> 313 <systemPropertyVariables>
314 <!-- Where is the Alfresco Share Webapp that we are testing --> 314 <!-- Where is the Alfresco Share Webapp that we are testing -->
315 <share.target>${share.client.url}</share.target> 315 <share.target>${share.client.url}</share.target>
316 </systemPropertyVariables> 316 </systemPropertyVariables>
317 </configuration> 317 </configuration>
318 <executions> 318 <executions>
319 <execution> 319 <execution>
320 <id>functional-tests</id> 320 <id>functional-tests</id>
321 <phase>integration-test</phase> 321 <phase>integration-test</phase>
322 <goals> 322 <goals>
323 <goal>integration-test</goal> 323 <goal>integration-test</goal>
324 </goals> 324 </goals>
325 </execution> 325 </execution>
326 <execution> 326 <execution>
327 <id>verify-tests</id> 327 <id>verify-tests</id>
328 <phase>verify</phase> 328 <phase>verify</phase>
329 <goals> 329 <goals>
330 <goal>verify</goal> 330 <goal>verify</goal>
331 </goals> 331 </goals>
332 </execution> 332 </execution>
333 </executions> 333 </executions>
334 </plugin> 334 </plugin>
335 </plugins> 335 </plugins>
336 </build> 336 </build>
337 337
338 <dependencies> 338 <dependencies>
339 <!-- Bring in the Share Page Objects (PO) used in our functional tests. 339 <!-- Bring in the Share Page Objects (PO) used in our functional tests.
340 Without it TestNG cannot load our test class when it uses page objects such as LoginPage --> 340 Without it TestNG cannot load our test class when it uses page objects such as LoginPage -->
341 <dependency> 341 <dependency>
342 <groupId>${alfresco.groupId}</groupId> 342 <groupId>${alfresco.groupId}</groupId>
343 <artifactId>share-po</artifactId> 343 <artifactId>share-po</artifactId>
344 <version>${alfresco.version}</version> 344 <version>${alfresco.version}</version>
345 <scope>test</scope> 345 <scope>test</scope>
346 346
347 <!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include 347 <!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
348 version 2.45 later on here in this profile --> 348 version 2.45 later on here in this profile -->
349 <exclusions> 349 <exclusions>
350 <exclusion> 350 <exclusion>
351 <groupId>org.seleniumhq.selenium</groupId> 351 <groupId>org.seleniumhq.selenium</groupId>
352 <artifactId>selenium-java</artifactId> 352 <artifactId>selenium-java</artifactId>
353 </exclusion> 353 </exclusion>
354 <exclusion> 354 <exclusion>
355 <groupId>org.seleniumhq.selenium</groupId> 355 <groupId>org.seleniumhq.selenium</groupId>
356 <artifactId>selenium-server</artifactId> 356 <artifactId>selenium-server</artifactId>
357 </exclusion> 357 </exclusion>
358 </exclusions> 358 </exclusions>
359 </dependency> 359 </dependency>
360 360
361 <!-- Bring in the Share Page Object (PO) Tests that comes with Alfresco. It has 361 <!-- Bring in the Share Page Object (PO) Tests that comes with Alfresco. It has
362 the org.alfresco.po.share.AbstractTest class that our custom tests extend. 362 the org.alfresco.po.share.AbstractTest class that our custom tests extend.
363 Without it TestNG cannot load our test class --> 363 Without it TestNG cannot load our test class -->
364 <dependency> 364 <dependency>
365 <groupId>${alfresco.groupId}</groupId> 365 <groupId>${alfresco.groupId}</groupId>
366 <artifactId>share-po</artifactId> 366 <artifactId>share-po</artifactId>
367 <version>${alfresco.version}</version> 367 <version>${alfresco.version}</version>
368 <classifier>tests</classifier> 368 <classifier>tests</classifier>
369 <scope>test</scope> 369 <scope>test</scope>
370 370
371 <!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include 371 <!-- Exclude version 2.39.0 of selenium that does not work with latest FF browsers, we include
372 version 2.45 later on here in this profile --> 372 version 2.45 later on here in this profile -->
373 <exclusions> 373 <exclusions>
374 <exclusion> 374 <exclusion>
375 <groupId>org.seleniumhq.selenium</groupId> 375 <groupId>org.seleniumhq.selenium</groupId>
376 <artifactId>selenium-java</artifactId> 376 <artifactId>selenium-java</artifactId>
377 </exclusion> 377 </exclusion>
378 <exclusion> 378 <exclusion>
379 <groupId>org.seleniumhq.selenium</groupId> 379 <groupId>org.seleniumhq.selenium</groupId>
380 <artifactId>selenium-server</artifactId> 380 <artifactId>selenium-server</artifactId>
381 </exclusion> 381 </exclusion>
382 </exclusions> 382 </exclusions>
383 </dependency> 383 </dependency>
384 384
385 <!-- Make sure we are running with newer selenium that works with newest FF (newer than 2.39.0) --> 385 <!-- Make sure we are running with newer selenium that works with newest FF (newer than 2.39.0) -->
386 <dependency> 386 <dependency>
387 <groupId>org.seleniumhq.selenium</groupId> 387 <groupId>org.seleniumhq.selenium</groupId>
388 <artifactId>selenium-java</artifactId> 388 <artifactId>selenium-java</artifactId>
389 <version>2.45.0-alfresco</version> 389 <version>2.45.0-alfresco</version>
390 </dependency> 390 </dependency>
391 <dependency> 391 <dependency>
392 <groupId>org.seleniumhq.selenium</groupId> 392 <groupId>org.seleniumhq.selenium</groupId>
393 <artifactId>selenium-server</artifactId> 393 <artifactId>selenium-server</artifactId>
394 <version>2.45.0-alfresco</version> 394 <version>2.45.0-alfresco</version>
395 <exclusions> 395 <exclusions>
396 <exclusion> 396 <exclusion>
397 <groupId>org.mortbay.jetty</groupId> 397 <groupId>org.mortbay.jetty</groupId>
398 <artifactId>servlet-api-2.5</artifactId> 398 <artifactId>servlet-api-2.5</artifactId>
399 </exclusion> 399 </exclusion>
400 </exclusions> 400 </exclusions>
401 </dependency> 401 </dependency>
402 402
403 <!-- Test NG is defined with test scope in share-po, so need it here too --> 403 <!-- Test NG is defined with test scope in share-po, so need it here too -->
404 <!-- Alfresco code creates a wrapper around Test NG --> 404 <!-- Alfresco code creates a wrapper around Test NG -->
405 <dependency> 405 <dependency>
406 <groupId>org.alfresco.test</groupId> 406 <groupId>org.alfresco.test</groupId>
407 <artifactId>alfresco-testng</artifactId> 407 <artifactId>alfresco-testng</artifactId>
408 <version>1.1</version> 408 <version>1.1</version>
409 <scope>test</scope> 409 <scope>test</scope>
410 <exclusions> 410 <exclusions>
411 <exclusion> 411 <exclusion>
412 <groupId>org.hamcrest</groupId> 412 <groupId>org.hamcrest</groupId>
413 <artifactId>hamcrest-core</artifactId> 413 <artifactId>hamcrest-core</artifactId>
414 </exclusion> 414 </exclusion>
415 </exclusions> 415 </exclusions>
416 </dependency> 416 </dependency>
417 </dependencies> 417 </dependencies>
418 </profile> 418 </profile>
419 419
420 </profiles> 420 </profiles>
421 </project> 421 </project>
422 422