Skip to content

Commit

Permalink
FACES-2998 Upgrade Bridge TCK tests to the new test framework (code r…
Browse files Browse the repository at this point in the history
…eview)
  • Loading branch information
ngriffin7a committed Feb 9, 2017
1 parent 1a8f47e commit 526dd72
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions tck/bridge-tck-harness/pom.xml
Expand Up @@ -17,6 +17,10 @@
<groupId>com.liferay.faces</groupId> <groupId>com.liferay.faces</groupId>
<artifactId>com.liferay.faces.bridge.api</artifactId> <artifactId>com.liferay.faces.bridge.api</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.liferay.faces</groupId>
<artifactId>com.liferay.faces.util</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.seleniumhq.selenium</groupId> <groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId> <artifactId>selenium-api</artifactId>
Expand Down
Expand Up @@ -23,9 +23,11 @@
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern; import java.util.regex.Pattern;


import com.liferay.faces.util.logging.Logger;
import com.liferay.faces.util.logging.LoggerFactory;

import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
Expand All @@ -52,7 +54,7 @@
public class TckTestCase extends IntegrationTesterBase { public class TckTestCase extends IntegrationTesterBase {


// Logger // Logger
private static final Logger logger = Logger.getLogger(TckTestCase.class.getName()); private static final Logger logger = LoggerFactory.getLogger(TckTestCase.class);


// XPath // XPath
private static final String TEST_RESULT_STATUS_XPATH_TEMPLATE = "//span[@id=\"{0}-result-status\"]"; private static final String TEST_RESULT_STATUS_XPATH_TEMPLATE = "//span[@id=\"{0}-result-status\"]";
Expand Down Expand Up @@ -83,8 +85,6 @@ public class TckTestCase extends IntegrationTesterBase {


static { static {


logger.setLevel(TestUtil.getLogLevel());

String tckContext = "/"; String tckContext = "/";
int defaultBrowserWaitTimeout = 5; int defaultBrowserWaitTimeout = 5;


Expand Down Expand Up @@ -117,7 +117,7 @@ public static void main(String[] args) {
@Parameters @Parameters
public static Collection testData() { public static Collection testData() {


logger.log(Level.INFO, "testData()"); logger.info("testData()");


List testList = new ArrayList<String[]>(200); List testList = new ArrayList<String[]>(200);
InputStream excludedTestsInputStream = null; InputStream excludedTestsInputStream = null;
Expand All @@ -127,7 +127,7 @@ public static Collection testData() {
excludedTestsInputStream = TckTestCase.class.getResourceAsStream(EXCLUDED_TESTS_FILE_PATH); excludedTestsInputStream = TckTestCase.class.getResourceAsStream(EXCLUDED_TESTS_FILE_PATH);
} }
catch (Exception e) { catch (Exception e) {
logger.log(Level.SEVERE, "Unable to acccess test exclusions file, {0} Exception thrown: {1}", logger.error("Unable to acccess test exclusions file, {0} Exception thrown: {1}",
new String[] { EXCLUDED_TESTS_FILE_PATH, e.getMessage() }); new String[] { EXCLUDED_TESTS_FILE_PATH, e.getMessage() });
System.exit(1); System.exit(1);
} }
Expand All @@ -138,7 +138,7 @@ public static Collection testData() {
exProps.loadFromXML(excludedTestsInputStream); exProps.loadFromXML(excludedTestsInputStream);
} }
catch (Exception e) { catch (Exception e) {
logger.log(Level.SEVERE, "Unable to parse test exclusions file, {0} Exception thrown: {1}", logger.error("Unable to parse test exclusions file, {0} Exception thrown: {1}",
new String[] { EXCLUDED_TESTS_FILE_PATH, e.getMessage() }); new String[] { EXCLUDED_TESTS_FILE_PATH, e.getMessage() });
System.exit(1); System.exit(1);
} }
Expand All @@ -147,7 +147,7 @@ public static Collection testData() {
testsInputStream = TckTestCase.class.getResourceAsStream(TESTS_FILE_PATH); testsInputStream = TckTestCase.class.getResourceAsStream(TESTS_FILE_PATH);
} }
catch (Exception e) { catch (Exception e) {
logger.log(Level.SEVERE, "Unable to acccess test description file, {0} Exception thrown: {1}", logger.error("Unable to acccess test description file, {0} Exception thrown: {1}",
new String[] { TESTS_FILE_PATH, e.getMessage() }); new String[] { TESTS_FILE_PATH, e.getMessage() });
System.exit(1); System.exit(1);
} }
Expand All @@ -158,7 +158,7 @@ public static Collection testData() {
testProps.loadFromXML(testsInputStream); testProps.loadFromXML(testsInputStream);
} }
catch (Exception e) { catch (Exception e) {
logger.log(Level.SEVERE, "Unable to parse test description file, {0} Exception thrown: {1}", logger.error("Unable to parse test description file, {0} Exception thrown: {1}",
new String[] { TESTS_FILE_PATH, e.getMessage() }); new String[] { TESTS_FILE_PATH, e.getMessage() });
System.exit(1); System.exit(1);
} }
Expand Down

0 comments on commit 526dd72

Please sign in to comment.