JBoss Portal SVN: r13070 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-03-23 13:12:39 -0400 (Mon, 23 Mar 2009)
New Revision: 13070
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java
Log:
selenium coordination debug print
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java 2009-03-23 16:33:38 UTC (rev 13069)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java 2009-03-23 17:12:39 UTC (rev 13070)
@@ -120,11 +120,12 @@
debugScreenshot(++count + ".jpg");
Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
-
+ debugPrint(portalName +" : "+r);
+
clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
debugScreenshot(++count + ".jpg");
r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
-
+ debugPrint(pageName +" : "+r);
clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
debugScreenshot(++count + ".jpg");
17 years, 1 month
JBoss Portal SVN: r13069 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-03-23 12:33:38 -0400 (Mon, 23 Mar 2009)
New Revision: 13069
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
Log:
debug flag in build.xml
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-03-23 16:25:42 UTC (rev 13068)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-03-23 16:33:38 UTC (rev 13069)
@@ -11,6 +11,7 @@
<property name="testng.dir" location="testng-files" />
<property name="testng.output.dir" location="test-output" />
+ <property name="testng.debug.dir" location="debug" />
<property name="test.build.dir" location="output/classes" />
<property name="test.src.dir" location="src" />
<property name="lib.dir" location="lib" />
@@ -65,6 +66,7 @@
<echo message="Screenshot : ${screenshot}" />
<echo message="Deleting testng report directory" />
<delete dir="${testng.output.dir}" />
+ <delete dir="${testng.debug.dir}" />
</target>
@@ -148,11 +150,13 @@
<echo message="Runing TestNG" />
<mkdir dir="test-output" />
+ <mkdir dir="debug" />
<testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}" listeners="org.jboss.portal.test.selenium.JBossSeleniumTestListener" suitename="SeleniumSingleTest" verbose="2">
<classfileset dir="${test.build.dir}" includes="${testname}" />
<sysproperty key="browser" value="${browser}" />
<sysproperty key="screenshot" value="${screenshot}" />
+ <sysproperty key="debug" value="${debug}" />
<sysproperty key="workspace" value="${workspace}" />
<sysproperty key="userCount" value="${userCount}" />
<sysproperty key="html-src" value="${html-src}" />
@@ -167,12 +171,14 @@
<echo message="Runing TestNG" />
<mkdir dir="test-output" />
+ <mkdir dir="debug" />
<testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}" suitename="SeleniumSuite">
<xmlfileset dir="." includes="${test.suite}" />
<sysproperty key="browser" value="${browser}" />
<sysproperty key="screenshot" value="${screenshot}" />
+ <sysproperty key="debug" value="${debug}" />
<sysproperty key="workspace" value="${workspace}" />
<sysproperty key="userCount" value="${userCount}" />
<sysproperty key="html-src" value="${html-src}" />
@@ -189,12 +195,15 @@
<echo message="Runing TestNG" />
<mkdir dir="test-output" />
+ <mkdir dir="debug" />
+
<testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}" suitename="SeleniumSuite">
<xmlfileset dir="." includes="${usecase.suite}" />
<sysproperty key="browser" value="${browser}" />
<sysproperty key="screenshot" value="${screenshot}" />
+ <sysproperty key="debug" value="${debug}" />
<sysproperty key="workspace" value="${workspace}" />
<sysproperty key="userCount" value="${userCount}" />
<sysproperty key="html-src" value="${html-src}" />
17 years, 1 month
JBoss Portal SVN: r13068 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium: portal and 1 other directory.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-03-23 12:25:42 -0400 (Mon, 23 Mar 2009)
New Revision: 13068
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSeleniumTestListener.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java
Log:
debug flag
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesTestCase.java 2009-03-23 14:13:15 UTC (rev 13067)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesTestCase.java 2009-03-23 16:25:42 UTC (rev 13068)
@@ -85,6 +85,24 @@
public void logoutAfterTest() {
}
+
+ @Test(enabled = true)
+ public void defaultCoordinationTest() {
+ selenium.open("/portal/portal/default/Coordination+Samples");
+ selenium.click("link=Coordination Samples");
+ selenium.waitForPageToLoad("30000");
+ selenium.open("http://localhost:8080/portal/portal/default/Coordination+Samples?zip=78759");
+ selenium.waitForPageToLoad("30000");
+ Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):78759"));
+ Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):78759"));
+
+ selenium.type("name", "xyz");
+ selenium.type("value", "123");
+ selenium.click("//input[@value='Update']");
+ selenium.waitForPageToLoad("30000");
+
+ Assert.assertTrue(selenium.getLocation().endsWith("/portal/portal/default/Coordination+Samples?xyz=123"));
+ }
@Test(enabled = true)
public void eventsExplicitTest() {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-03-23 14:13:15 UTC (rev 13067)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-03-23 16:25:42 UTC (rev 13068)
@@ -17,6 +17,7 @@
public class JBossPortalSeleniumTestCase {
private String casePfx = "portal.";
+ private String debugDir = "debug";
static {
try {
@@ -259,4 +260,15 @@
Assert.assertTrue(selenium.isElementPresent("Link=Login"), "Login link not present.");
}
}
+
+ protected void debugPrint(String debugText){
+ if (JBossSeleniumTestListener.debug)
+ System.out.println("[Selenium debug] : " + debugText);
+ }
+
+ protected void debugScreenshot(String filename){
+ if (JBossSeleniumTestListener.debug)
+ selenium.captureScreenshot(debugDir+"/"+filename);
+ }
+
}
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSeleniumTestListener.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSeleniumTestListener.java 2009-03-23 14:13:15 UTC (rev 13067)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossSeleniumTestListener.java 2009-03-23 16:25:42 UTC (rev 13068)
@@ -17,6 +17,7 @@
protected static int count;
protected static boolean screenshot = false;
protected static boolean htmlSource = false;
+ protected static boolean debug = false;
protected static String outputDir = "";
static {
@@ -30,6 +31,11 @@
htmlSource = true;
}
+ String sd = System.getProperty("html-src");
+ if ("true".equals(sd)) {
+ debug = true;
+ }
+
String so = System.getProperty("output-dir");
if (so != null) {
outputDir = so;
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-03-23 14:13:15 UTC (rev 13067)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-03-23 16:25:42 UTC (rev 13068)
@@ -414,6 +414,7 @@
portal.e2e.por.tl.main=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]
portal.e2e.por.tl.security=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]
portal.e2e.por.tl.properties=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]
+
portal.e2e.por.tl.theme=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]
portal.e2e.por.tl.rename=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]
portal.e2e.por.tl.delete=//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]
@@ -428,6 +429,7 @@
portal.e2e.pag.tl.display=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]
portal.e2e.pag.tl.delete=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]
portal.e2e.pag.tl.makedef=//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]
+portal.e2e.pag.tl.coord=//a[contains(@id,''pages-datatable:{0}:edit-coord'')]
portal.e2e.div.por.cont=content-container
# PortalSamplesTestCase
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java 2009-03-23 14:13:15 UTC (rev 13067)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java 2009-03-23 16:25:42 UTC (rev 13068)
@@ -113,56 +113,57 @@
clickAndWait("link=Admin");
selenium.captureScreenshot(++count + ".jpg");
clickIfVisible(TAB_PORTALOBJ_ID);
- selenium.captureScreenshot(++count + ".jpg");
+ debugScreenshot(++count + ".jpg");
clickIfVisible(LINK_PORTALS_ID);
- selenium.captureScreenshot(++count + ".jpg");
+ debugScreenshot(++count + ".jpg");
clickIfVisible(LINK_PORTAL_HOME);
- selenium.captureScreenshot(++count + ".jpg");
+ debugScreenshot(++count + ".jpg");
Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
- selenium.captureScreenshot(++count + ".jpg");
+ debugScreenshot(++count + ".jpg");
r = findTableRow(TABLE_PORTALPAGE_ADMIN, pageName, 0) - 1;
clickAndWait(MessageFormat.format(PAG_TL_COORDINATION, r));
- selenium.captureScreenshot(++count + ".jpg");
- // selenium.setSpeed("5000");
+ debugScreenshot(++count + ".jpg");
+
// create delete alias
selenium.addSelection(LIS_RENDER_PAR, "label={urn:jboss:portal:samples:coor}zipcode");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.captureScreenshot(++count + ".jpg");
+ debugScreenshot(++count + ".jpg");
selenium.type(INP_ALIAS_NAME, "aliasBindDelete");
selenium.click(SUB_CREATE_ALIAS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.captureScreenshot(++count + ".jpg");
+ debugScreenshot(++count + ".jpg");
+
// delete alias
r = findTableRow(TBL_ALIASES, "aliasBindDelete", 0);
selenium.click(MessageFormat.format(LNK_T_ALIAS_DELETE,r));
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.captureScreenshot(++count + ".jpg");
+ debugScreenshot(++count + ".jpg");
selenium.click(SUB_ALIAS_DEL_CANCEL);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.captureScreenshot(++count + ".jpg");
+ debugScreenshot(++count + ".jpg");
r = findTableRow(TBL_ALIASES, "aliasBindDelete", 0);
selenium.click(MessageFormat.format(LNK_T_ALIAS_DELETE,r));
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.captureScreenshot(++count + ".jpg");
+ debugScreenshot(++count + ".jpg");
selenium.click(SUB_ALIAS_DEL_SUBMIT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.captureScreenshot(++count + ".jpg");
+ debugScreenshot(++count + ".jpg");
openAndWait("/portal/auth/portal/default/Coordination+Samples?zip=222333");
- selenium.captureScreenshot(++count + ".jpg");
+ debugScreenshot(++count + ".jpg");
Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):222333"));
Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):222333"));
openAndWait("/portal/auth/portal/default/Coordination+Samples?aliasBindDelete=222334");
- selenium.captureScreenshot(++count + ".jpg");
+ debugScreenshot(++count + ".jpg");
Assert.assertTrue(selenium.isTextPresent("Weather for (my_zipcode):null"));
Assert.assertTrue(selenium.isTextPresent("Map for (your_zipcode):null"));
}
@@ -237,7 +238,6 @@
clickIfVisible(LINK_PORTALS_ID);
clickIfVisible(LINK_PORTAL_HOME);
- Assert.assertTrue(selenium.isTextPresent("Create a portal named:"));
int r = findTableRow(TABLE_PORTAL_ADMIN, portalName, 0) - 1;
clickAndWait(MessageFormat.format(POR_TL_MAIN, r));
17 years, 1 month