You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by as...@apache.org on 2018/04/30 17:23:43 UTC
portals-pluto git commit: PLUTO-709: Making TCKSimpleTestDriver
extendable
Repository: portals-pluto
Updated Branches:
refs/heads/master 5d0435075 -> 8ceafe727
PLUTO-709: Making TCKSimpleTestDriver extendable
Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/8ceafe72
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/8ceafe72
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/8ceafe72
Branch: refs/heads/master
Commit: 8ceafe727c7492846d3f5fb25c5283b69f554586
Parents: 5d04350
Author: vsingleton <vs...@gmail.com>
Authored: Sun Apr 29 20:05:05 2018 -0400
Committer: Neil Griffin <ne...@gmail.com>
Committed: Mon Apr 30 13:23:15 2018 -0400
----------------------------------------------------------------------
portlet-tck_3.0/driver/pom.xml | 2 +-
.../portlet/tck/driver/TCKSimpleTestDriver.java | 26 ++++++++++----------
portlet-tck_3.0/pom.xml | 3 +++
3 files changed, 17 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/8ceafe72/portlet-tck_3.0/driver/pom.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/driver/pom.xml b/portlet-tck_3.0/driver/pom.xml
index 60e4e2c..da1d092 100644
--- a/portlet-tck_3.0/driver/pom.xml
+++ b/portlet-tck_3.0/driver/pom.xml
@@ -600,7 +600,7 @@
<configuration>
<testClassesDirectory>${project.build.directory}/classes</testClassesDirectory>
<includes>
- <include>**/javax/**</include>
+ <include>${test.tck.driver}</include>
</includes>
<useFile>true</useFile>
<argLine>-Xms512m -Xmx512m</argLine>
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/8ceafe72/portlet-tck_3.0/driver/src/main/java/javax/portlet/tck/driver/TCKSimpleTestDriver.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/driver/src/main/java/javax/portlet/tck/driver/TCKSimpleTestDriver.java b/portlet-tck_3.0/driver/src/main/java/javax/portlet/tck/driver/TCKSimpleTestDriver.java
index 7782c01..757407c 100644
--- a/portlet-tck_3.0/driver/src/main/java/javax/portlet/tck/driver/TCKSimpleTestDriver.java
+++ b/portlet-tck_3.0/driver/src/main/java/javax/portlet/tck/driver/TCKSimpleTestDriver.java
@@ -63,15 +63,15 @@ import javax.portlet.tck.constants.Constants;
@RunWith(value = Parameterized.class)
public class TCKSimpleTestDriver {
- private static String loginUrl, host, port, testFile, browser,
+ protected static String loginUrl, host, port, testFile, browser,
username, usernameId, password, passwordId, testContextBase, module;
- private static int timeout = 3; // for waiting on page load
- private static boolean useGeneratedUrl = true, debug = false, dryrun = false;
+ protected static int timeout = 3; // for waiting on page load
+ protected static boolean useGeneratedUrl = true, debug = false, dryrun = false;
- private static WebDriver driver;
- private String page, tcName;
+ protected static WebDriver driver;
+ protected String page, tcName;
- private List<String> debugLines = new ArrayList<>();
+ protected List<String> debugLines = new ArrayList<>();
/**
* Reads the consolidated list of test cases and provides the list to Junit
@@ -79,7 +79,7 @@ public class TCKSimpleTestDriver {
* @return a Collection of test cases to run
*/
@SuppressWarnings("rawtypes")
- @Parameters
+ @Parameters (name = "{1}")
public static Collection getTestList () {
System.out.println("getTestList");
testFile = System.getProperty("test.list.file");
@@ -237,7 +237,7 @@ public class TCKSimpleTestDriver {
System.out.println(" PasswordId =" + passwordId);
System.out.println(" Browser =" + browser);
System.out.println(" Driver =" + wd);
- System.out.println(" binary =" + binary + " ... used for ChromeDriver & FirefoxDriver only, for now");
+ System.out.println(" binary =" + binary);
System.out.println(" headless =" + headless);
if (browser.equalsIgnoreCase("firefox")) {
@@ -378,7 +378,7 @@ public class TCKSimpleTestDriver {
*
* @return a list of elements for the TC (should only be one)
*/
- private List<WebElement> accessPage() throws Exception {
+ protected List<WebElement> accessPage() throws Exception {
List<WebElement> wels = driver.findElements(By.linkText(page));
debugLines.add(" Access page, link found: " + !wels.isEmpty() + ", page===" + page + "===");
@@ -406,7 +406,7 @@ public class TCKSimpleTestDriver {
/**
* Called to login to the portal if necessary.
*/
- private static void login() {
+ protected static void login() {
driver.get(loginUrl);
@@ -433,7 +433,7 @@ public class TCKSimpleTestDriver {
/**
* Analyzes the page based on the test case name and records success or failure.
*/
- private void checkResults(List<WebElement> tcels) {
+ protected void checkResults(List<WebElement> tcels) {
String resultId = tcName + Constants.RESULT_ID;
String detailId = tcName + Constants.DETAIL_ID;
@@ -465,7 +465,7 @@ public class TCKSimpleTestDriver {
* @throws Exception
*/
@SuppressWarnings("unused")
- private List<WebElement> processClickable(List<WebElement> wels) throws Exception {
+ protected List<WebElement> processClickable(List<WebElement> wels) throws Exception {
String setupId = tcName + Constants.SETUP_ID;
String actionId = tcName + Constants.CLICK_ID;
String resultId = tcName + Constants.RESULT_ID;
@@ -542,7 +542,7 @@ public class TCKSimpleTestDriver {
* @return <code>true</code> if async was handled; <code>false</code> otherwise.
* @throws Exception
*/
- private boolean processAsync() throws Exception {
+ protected boolean processAsync() throws Exception {
String asyncId = tcName + Constants.ASYNC_ID;
String resultId = tcName + Constants.RESULT_ID;
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/8ceafe72/portlet-tck_3.0/pom.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/pom.xml b/portlet-tck_3.0/pom.xml
index 1206cdc..707349c 100644
--- a/portlet-tck_3.0/pom.xml
+++ b/portlet-tck_3.0/pom.xml
@@ -503,6 +503,9 @@
<activation>
<activeByDefault>true</activeByDefault>
</activation>
+ <properties>
+ <test.tck.driver>**/javax/portlet/tck/driver/TCKSimpleTestDriver.java</test.tck.driver>
+ </properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>