[richfaces-svn-commits] JBoss Rich Faces SVN: r16022 - in branches/community/3.3.X/samples/richfaces-demo/functional-test: src/test/java/org/jboss/richfaces/integrationTest and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Fri Nov 27 09:29:07 EST 2009


Author: lfryc at redhat.com
Date: 2009-11-27 09:29:06 -0500 (Fri, 27 Nov 2009)
New Revision: 16022

Modified:
   branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml
   branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java
Log:
- rf-demo ftest - introduced some maven environment variables - "project.build.directory" and "resourced.dir"

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml	2009-11-27 10:55:32 UTC (rev 16021)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml	2009-11-27 14:29:06 UTC (rev 16022)
@@ -216,7 +216,7 @@
 									<suiteXmlFiles>
 										<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
 									</suiteXmlFiles>
-									<argLine>-Dbrowser='${browser}' -Dcontext.root='${context.root}' -Dcontext.path='${context.path}' -Dselenium.host='${selenium.host}' -Dselenium.port='${selenium.port}'</argLine>
+									<argLine>-Dbrowser='${browser}' -Dcontext.root='${context.root}' -Dcontext.path='${context.path}' -Dselenium.host='${selenium.host}' -Dselenium.port='${selenium.port}' -Dmaven.resources.dir='${resources.dir}' -Dmaven.project.build.directory='${project.build.directory}'</argLine>
 									<firefoxProfileTemplate>${firefoxProfileTemplate}</firefoxProfileTemplate>
 								</configuration>
 							</execution>

Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java	2009-11-27 10:55:32 UTC (rev 16021)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java	2009-11-27 14:29:06 UTC (rev 16022)
@@ -69,6 +69,12 @@
      * to use it in cases of building absolute URLs.
      */
     protected String contextPath;
+    
+    /**
+     * Introduce some maven build properties
+     */
+    protected String mavenProjectBuildDirectory;	// usually ${project}/target
+    protected String mavenResourcesDir;				// usually ${project}/target/test-classes
 
     /**
      * predefined waitings to use in inheritors
@@ -76,30 +82,35 @@
     protected Waiting waitModelUpdate = Wait.interval(100).timeout(30000);
     protected Waiting waitGuiInteraction = Wait.interval(100).timeout(500);
 
-    /**
-     * Initializes context before each class run.
-     * 
-     * Parameters will be obtained from TestNG.
-     * 
-     * @param contextRoot
-     *            server's context root, e.g. http://localhost:8080/
-     * @param contextPath
-     *            context path to application in context of server's root (e.g.
-     *            /myapp)
-     * @param browser
-     *            used browser (e.g. "*firefox", see selenium reference API)
-     * @param seleniumPort
-     *            specifies on which port should selenium server run
-     */
-    @BeforeClass
-    @Parameters( { "context.root", "context.path", "browser", "selenium.host", "selenium.port" })
-    public void initializeContext(String contextRoot, String contextPath, String browser, String seleniumHost, String seleniumPort) {
-        this.contextRoot = contextRoot;
-        this.contextPath = contextPath;
-        selenium = new DefaultSelenium(seleniumHost, Integer.valueOf(seleniumPort), browser, contextRoot);
-        selenium.start();
-        allowInitialXpath();
-        loadCustomLocationStrategies();
+	/**
+	 * Initializes context before each class run.
+	 * 
+	 * Parameters will be obtained from TestNG.
+	 * 
+	 * @param contextRoot
+	 *            server's context root, e.g. http://localhost:8080/
+	 * @param contextPath
+	 *            context path to application in context of server's root (e.g.
+	 *            /myapp)
+	 * @param browser
+	 *            used browser (e.g. "*firefox", see selenium reference API)
+	 * @param seleniumPort
+	 *            specifies on which port should selenium server run
+	 */
+	@BeforeClass
+	@Parameters( { "context.root", "context.path", "browser", "selenium.host", "selenium.port", "maven.resources.dir",
+			"maven.project.build.directory" })
+	public void initializeContext(String contextRoot, String contextPath, String browser, String seleniumHost,
+			String seleniumPort, String mavenResourcesDir, String mavenProjectBuildDirectory) {
+		this.contextRoot = contextRoot;
+		this.contextPath = contextPath;
+		this.mavenResourcesDir = mavenResourcesDir;
+		this.mavenProjectBuildDirectory = mavenProjectBuildDirectory;
+
+		selenium = new DefaultSelenium(seleniumHost, Integer.valueOf(seleniumPort), browser, contextRoot);
+		selenium.start();
+		allowInitialXpath();
+		loadCustomLocationStrategies();
 	}
 
 	/**



More information about the richfaces-svn-commits mailing list