Commit 284710ab authored by mindthegab's avatar mindthegab
Browse files

issue #217

-- added -Pregression profile to invoke Share PO / Selenium
functional/regression tests 
-- tested successfully with 'mvn clean install' -Prun,regression
(optionally -Dtest=LoginPageTests)
-- reports are produced in target
-- updates docs on available profiles
parent 572cbab5
Loading
Loading
Loading
Loading
+106 −0
Original line number Diff line number Diff line
@@ -92,6 +92,112 @@
                </plugins>
            </build>
        </profile>
        <!-- Runs regression tests using Alfresco Share PO (Page Object) vanilla Selenium / Webdrone driven functional test, during integration-test phase. 
             NOTE: Assumes an already running Alfresco + Share at the default location ${app.share.url} (e.g. by invoking -Prun,regression) -->
        <profile>
            <id>regression</id>
            <properties>
                <maven.tomcat.fork>true</maven.tomcat.fork>
                <!-- The URL Under Test -->
                <app.share.url>http://localhost:8080/share</app.share.url>
            </properties>
            <build>
                <plugins>
                    <!-- Workaround for classloading issue in share-po (need to unpack it) -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>prepare-regression-test-resources</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <configuration>
                                    <artifact>${alfresco.groupId}:share-po:${alfresco.version}:jar:tests</artifact>
                                    <outputDirectory>${project.build.directory}/testng-resources</outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.17</version>
                        <executions>
                            <execution>
                                <id>run-regression-tests</id>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <phase>integration-test</phase>
                                <configuration>
                                    <systemProperties>
                                        <share.target>${app.share.url}</share.target>
                                    </systemProperties>
                                    <dependenciesToScan>
                                        <dependency>${alfresco.groupId}:share-po</dependency>
                                    </dependenciesToScan>
                                    <additionalClasspathElements>
                                        <additionalClasspathElement>${project.build.directory}/testng-resources</additionalClasspathElement>
                                    </additionalClasspathElements>
                                    <suiteXmlFiles>
                                        <suiteXmlFile>${project.build.directory}/testng-resources/testng.xml</suiteXmlFile>
                                    </suiteXmlFiles>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>${alfresco.groupId}</groupId>
                    <artifactId>share-po</artifactId>
                    <version>${alfresco.version}</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>${alfresco.groupId}</groupId>
                    <artifactId>share-po</artifactId>
                    <version>${alfresco.version}</version>
                    <classifier>tests</classifier>
                </dependency>
                <dependency>
                    <groupId>commons-cli</groupId>
                    <artifactId>commons-cli</artifactId>
                    <version>1.2</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-beans</artifactId>
                    <version>3.1.1.RELEASE</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-context</artifactId>
                    <version>3.1.1.RELEASE</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.testng</groupId>
                    <artifactId>testng</artifactId>
                    <version>6.8.8</version>
                    <scope>test</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>org.hamcrest</groupId>
                            <artifactId>hamcrest-core</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
        </profile>

        
    </profiles>
    
</project>
+3 −1
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@ SDK Available Profiles
| any | setup   | Sets up the sdk, e.g. grabs springloaded. | Manual: <<<-Psetup>>> (automated in the run.sh)   | initialize |
*-----------+--------------+-------------+-------------+-------------+
| amp, share-amp | atv   | (Experimental) Invokes the {{{https://github.com/AlfrescoLabs/technical-validation/}Alfresco Technical Validation tool}} | Manual: <<<-Patv>>>   | validate |
*-----------+--------------+-------------+-------------+-------------+
| all-in-one | regression   | (Experimental) Invokes the Alfresco {{{https://github.com/AlfrescoLabs/technical-validation/}Share PO}} Webdrone / Selenium based regression tests| Manual: <<<-Pregression>>>   | integration-test |
*-----------+--------------+-------------+-------------+-------------+
    
    The full list of available profiles (with their activation conditions) can be instead found in the <<<profiles>>> section of the