You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2017/10/09 01:00:26 UTC
juddi git commit: JUDDI-651 selenium tests for login/logout
Repository: juddi
Updated Branches:
refs/heads/feature/JUDDI-651-2 [created] 6ee02ccb6
JUDDI-651 selenium tests for login/logout
Project: http://git-wip-us.apache.org/repos/asf/juddi/repo
Commit: http://git-wip-us.apache.org/repos/asf/juddi/commit/6ee02ccb
Tree: http://git-wip-us.apache.org/repos/asf/juddi/tree/6ee02ccb
Diff: http://git-wip-us.apache.org/repos/asf/juddi/diff/6ee02ccb
Branch: refs/heads/feature/JUDDI-651-2
Commit: 6ee02ccb65d6fa8850dca52f0ea86ebd06f9b2a9
Parents: 3e35495
Author: Alex O'Ree <al...@apache.org>
Authored: Sun Oct 8 21:00:22 2017 -0400
Committer: Alex O'Ree <al...@apache.org>
Committed: Sun Oct 8 21:00:22 2017 -0400
----------------------------------------------------------------------
.gitignore | 1 +
juddi-gui/src/main/resources/META-INF/uddi.xml | 14 +-
juddi-gui/src/main/webapp/index.jsp | 2 +-
juddi-gui/src/main/webapp/login.jsp | 2 +-
uddi-tck-base/src/main/resources/tck.properties | 2 +-
uddi-tck/RepositoryMap.xml | 212 +++++++++++++++++++
uddi-tck/pom.xml | 46 ++++
.../org/apache/juddi/gui/test/BaseTest.java | 172 +++++++++++++++
.../gui/test/login/LoginIntegrationTest.java | 61 ++++++
9 files changed, 508 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/juddi/blob/6ee02ccb/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 944a733..5a93cda 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@ docs/db/ddl/*.ddl
*.ddl
uddi-tck/pref-rpt-*.txt
nb-configuration.xml
+uddi-tck/drivers/
http://git-wip-us.apache.org/repos/asf/juddi/blob/6ee02ccb/juddi-gui/src/main/resources/META-INF/uddi.xml
----------------------------------------------------------------------
diff --git a/juddi-gui/src/main/resources/META-INF/uddi.xml b/juddi-gui/src/main/resources/META-INF/uddi.xml
index 7d66c29..08ed9df 100644
--- a/juddi-gui/src/main/resources/META-INF/uddi.xml
+++ b/juddi-gui/src/main/resources/META-INF/uddi.xml
@@ -38,7 +38,19 @@ It currently does not use the ValueSet, jUDDI, Replication, or REST APIs
<securityUrl>http://localhost:8080/juddiv3/services/security</securityUrl>
<subscriptionUrl>http://localhost:8080/juddiv3/services/subscription</subscriptionUrl>
</node>
- <node>
+ <node>
+ <!-- required 'default' node -->
+ <name>integrationTest</name>
+ <description>UDDIv3 CI (localhost)</description>
+ <!-- JAX-WS Transport -->
+ <proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+ <custodyTransferUrl>http://localhost:8880/juddiv3/services/custody-transfer</custodyTransferUrl>
+ <inquiryUrl>http://localhost:8880/juddiv3/services/inquiry</inquiryUrl>
+ <publishUrl>http://localhost:8880/juddiv3/services/publish</publishUrl>
+ <securityUrl>http://localhost:8880/juddiv3/services/security</securityUrl>
+ <subscriptionUrl>http://localhost:8880/juddiv3/services/subscription</subscriptionUrl>
+ </node>
+ <node>
<!-- for jUDDI v0.9 to 2.0.1 -->
<name>juddiv2</name>
<description>UDDIv2 Node (localhost)</description>
http://git-wip-us.apache.org/repos/asf/juddi/blob/6ee02ccb/juddi-gui/src/main/webapp/index.jsp
----------------------------------------------------------------------
diff --git a/juddi-gui/src/main/webapp/index.jsp b/juddi-gui/src/main/webapp/index.jsp
index fb727f0..39fe581 100644
--- a/juddi-gui/src/main/webapp/index.jsp
+++ b/juddi-gui/src/main/webapp/index.jsp
@@ -99,7 +99,7 @@
</select>
<br>
<input type="checkbox" name="setcookie" checked> Remember my decision<br>
- <button type="submit" value="Go" class="btn btn-primary">Go</button>
+ <button type="submit" value="Go" class="btn btn-primary" id="login_page_go">Go</button>
</form>
<b>We welcome help internationalizing jUDDI!</b>
<noscript>Your browser does not support JavaScript! Functionality will be so severely reduced, that you might as well give up, sorry!</noscript>
http://git-wip-us.apache.org/repos/asf/juddi/blob/6ee02ccb/juddi-gui/src/main/webapp/login.jsp
----------------------------------------------------------------------
diff --git a/juddi-gui/src/main/webapp/login.jsp b/juddi-gui/src/main/webapp/login.jsp
index d1b7745..23cddbe 100644
--- a/juddi-gui/src/main/webapp/login.jsp
+++ b/juddi-gui/src/main/webapp/login.jsp
@@ -35,7 +35,7 @@
<script type="text/javascript">
loggedin = true;
</script>
- <a class="btn" title="<%=ResourceLoader.GetResource(session, "navbar.login.logout")%>" href="javascript:logout();">
+ <a class="btn" title="<%=ResourceLoader.GetResource(session, "navbar.login.logout")%>" href="javascript:logout();" id="logout_button">
<%
if (!request.isSecure() || !UddiHub.getInstance(application, session).isSecure()) {
%>
http://git-wip-us.apache.org/repos/asf/juddi/blob/6ee02ccb/uddi-tck-base/src/main/resources/tck.properties
----------------------------------------------------------------------
diff --git a/uddi-tck-base/src/main/resources/tck.properties b/uddi-tck-base/src/main/resources/tck.properties
index 9a8cf1b..303ac34 100644
--- a/uddi-tck-base/src/main/resources/tck.properties
+++ b/uddi-tck-base/src/main/resources/tck.properties
@@ -94,4 +94,4 @@ trustStorePassword=Test
# the TCK now has tests for uddiv2 and uddiv3
uddiv2.enabled=true
-uddiv3.enabled=true
\ No newline at end of file
+uddiv3.enabled=true
http://git-wip-us.apache.org/repos/asf/juddi/blob/6ee02ccb/uddi-tck/RepositoryMap.xml
----------------------------------------------------------------------
diff --git a/uddi-tck/RepositoryMap.xml b/uddi-tck/RepositoryMap.xml
new file mode 100644
index 0000000..4d63f85
--- /dev/null
+++ b/uddi-tck/RepositoryMap.xml
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<!--
+ * Copyright 2001-2009 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */ -->
+<root>
+ <windows>
+ <driver id="internetexplorer">
+ <version id="3.4.0">
+ <bitrate sixtyfourbit="true">
+ <filelocation>http://selenium-release.storage.googleapis.com/3.4/IEDriverServer_x64_3.4.0.zip</filelocation>
+ <hash>3e79d5cf2acdd91d0ddab9f2044ce51057ff77fe</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ <bitrate thirtytwobit="true">
+ <filelocation>http://selenium-release.storage.googleapis.com/3.4/IEDriverServer_Win32_3.4.0.zip</filelocation>
+ <hash>8657fb63344f6e26198b860bc089a7a651e43441</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ <driver id="edge">
+ <version id="4.15063">
+ <bitrate sixtyfourbit="true" thirtytwobit="true">
+ <filelocation>https://download.microsoft.com/download/3/4/2/342316D7-EBE0-4F10-ABA2-AE8E0CDF36DD/MicrosoftWebDriver.exe</filelocation>
+ <hash>31e80ae4fd88ed3097a1c4d3fe763539ee88e560</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ <driver id="googlechrome">
+ <version id="2.29">
+ <bitrate thirtytwobit="true" sixtyfourbit="true">
+ <filelocation>https://chromedriver.storage.googleapis.com/2.29/chromedriver_win32.zip</filelocation>
+ <hash>2f02f28d3ff1b8f2a63cb3bc32c26ade60ac4737</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ <driver id="operachromium">
+ <version id="0.2.2">
+ <bitrate sixtyfourbit="true">
+ <filelocation>https://github.com/operasoftware/operachromiumdriver/releases/download/v0.2.2/operadriver_win64.zip</filelocation>
+ <hash>8b84d334ca6dc5e30c168d8df080c1827e4c6fdb</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ <bitrate thirtytwobit="true">
+ <filelocation>https://github.com/operasoftware/operachromiumdriver/releases/download/v0.2.2/operadriver_win32.zip</filelocation>
+ <hash>daa9ba52eeca5ea3cb8a9020b85642ec047e9890</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ <driver id="phantomjs">
+ <version id="2.1.1">
+ <bitrate thirtytwobit="true" sixtyfourbit="true">
+ <filelocation>https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-windows.zip</filelocation>
+ <hash>eb61e6dc49832a3d60f708a92fa7299c57cad7db</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ <version id="1.9.8">
+ <bitrate thirtytwobit="true" sixtyfourbit="true">
+ <filelocation>https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-windows.zip</filelocation>
+ <hash>4531bd64df101a689ac7ac7f3e11bb7e77af8eff</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ <driver id="marionette">
+ <version id="0.16.1">
+ <bitrate sixtyfourbit="true">
+ <filelocation>https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-win64.zip</filelocation>
+ <hash>f49aa6de084ce82b546868992b646e57e3bf3de8</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ <bitrate thirtytwobit="true">
+ <filelocation>https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-win32.zip</filelocation>
+ <hash>37b75297a9c316226bf3814d9908b044e21b43a3</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ </windows>
+ <linux>
+ <driver id="googlechrome">
+ <version id="2.29">
+ <bitrate sixtyfourbit="true">
+ <filelocation>https://chromedriver.storage.googleapis.com/2.29/chromedriver_linux64.zip</filelocation>
+ <hash>025a098cde0a6ad8aef53d6734979c9845bf49b5</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ <bitrate thirtytwobit="true">
+ <filelocation>https://chromedriver.storage.googleapis.com/2.29/chromedriver_linux32.zip</filelocation>
+ <hash>36d4082a6fb3b3cbb31b013a08b1900baf13743d</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ <driver id="operachromium">
+ <version id="0.2.2">
+ <bitrate thirtytwobit="true">
+ <filelocation>https://github.com/operasoftware/operachromiumdriver/releases/download/v0.2.2/operadriver_linux32.zip</filelocation>
+ <hash>8b0b92a870a1b4ba619eb0b85ec587caa2942e5b</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ <bitrate sixtyfourbit="true">
+ <filelocation>https://github.com/operasoftware/operachromiumdriver/releases/download/v0.2.2/operadriver_linux64.zip</filelocation>
+ <hash>c207c6916e20ecbbc7157e3bdeb4737f14f15fe3</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ <driver id="phantomjs">
+ <version id="2.1.1">
+ <bitrate sixtyfourbit="true">
+ <filelocation>https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2</filelocation>
+ <hash>f8afc8a24eec34c2badccc93812879a3d6f2caf3</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ <bitrate thirtytwobit="true">
+ <filelocation>https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-i686.tar.bz2</filelocation>
+ <hash>9870663f5c2826501508972b8a201d9210d27b59</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ <version id="1.9.8">
+ <bitrate sixtyfourbit="true">
+ <filelocation>https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2</filelocation>
+ <hash>d29487b2701bcbe3c0a52bc176247ceda4d09d2d</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ <bitrate thirtytwobit="true">
+ <filelocation>https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-i686.tar.bz2</filelocation>
+ <hash>efac5ae5b84a4b2b3fa845e8390fca39e6e637f2</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ <driver id="marionette">
+ <version id="0.16.1">
+ <bitrate sixtyfourbit="true">
+ <filelocation>https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-linux64.tar.gz</filelocation>
+ <hash>95276285b65987b6e94e57be55fdc60b95423016</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ <bitrate arm="true">
+ <filelocation>https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-arm7hf.tar.gz</filelocation>
+ <hash>6f013de184c8f3dba3ec39ea49de2a166cb18efb</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ </linux>
+ <osx>
+ <driver id="googlechrome">
+ <version id="2.29">
+ <bitrate sixtyfourbit="true">
+ <filelocation>https://chromedriver.storage.googleapis.com/2.29/chromedriver_mac64.zip</filelocation>
+ <hash>cec18df4ef736d6712593faf91b462352217214a</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ <driver id="operachromium">
+ <version id="0.2.2">
+ <bitrate sixtyfourbit="true">
+ <filelocation>https://github.com/operasoftware/operachromiumdriver/releases/download/v0.2.2/operadriver_mac64.zip</filelocation>
+ <hash>d58a3b676dda7ede5c38e5df218e7c619495c4ed</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ <driver id="phantomjs">
+ <version id="2.1.1">
+ <bitrate thirtytwobit="true" sixtyfourbit="true">
+ <filelocation>https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip</filelocation>
+ <hash>c6e1a16bb9e89ce1e392a4768e99177797c93350</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ <version id="1.9.8">
+ <bitrate thirtytwobit="true" sixtyfourbit="true">
+ <filelocation>https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-macosx.zip</filelocation>
+ <hash>d70bbefd857f21104c5961b9dd081781cb4d999a</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ <driver id="marionette">
+ <version id="0.15.0">
+ <bitrate thirtytwobit="true" sixtyfourbit="true">
+ <filelocation>https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-macos.tar.gz</filelocation>
+ <hash>f687a69521b22640080ea87920b358c7498bdf31</hash>
+ <hashtype>sha1</hashtype>
+ </bitrate>
+ </version>
+ </driver>
+ </osx>
+</root>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/juddi/blob/6ee02ccb/uddi-tck/pom.xml
----------------------------------------------------------------------
diff --git a/uddi-tck/pom.xml b/uddi-tck/pom.xml
index 0bd6cbc..0f07eff 100644
--- a/uddi-tck/pom.xml
+++ b/uddi-tck/pom.xml
@@ -104,10 +104,56 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.seleniumhq.selenium</groupId>
+ <artifactId>selenium-firefox-driver</artifactId>
+ <version>3.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.seleniumhq.selenium</groupId>
+ <artifactId>selenium-java</artifactId>
+ <version>3.4.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.seleniumhq.selenium</groupId>
+ <artifactId>selenium-chrome-driver</artifactId>
+ <version>3.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+
</dependencies>
<build>
<plugins>
+ <plugin>
+ <groupId>com.lazerycode.selenium</groupId>
+ <artifactId>driver-binary-downloader-maven-plugin</artifactId>
+ <version>1.0.14</version>
+ <configuration>
+ <!-- root directory that downloaded driver binaries will be stored in -->
+ <rootStandaloneServerDirectory>drivers</rootStandaloneServerDirectory>
+ <!-- Where you want to store downloaded zip files -->
+ <downloadedZipFileDirectory>drivers/zip</downloadedZipFileDirectory>
+ <!-- last synched 2017-10-08 -->
+ <!-- https://raw.githubusercontent.com/Ardesco/selenium-standalone-server-plugin/master/src/main/resources/RepositoryMap.xml -->
+ <customRepositoryMap>RepositoryMap.xml</customRepositoryMap>
+
+ <onlyGetDriversForHostOperatingSystem>true</onlyGetDriversForHostOperatingSystem>
+
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>selenium</goal>
+ </goals>
+ <phase>process-resources</phase>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
http://git-wip-us.apache.org/repos/asf/juddi/blob/6ee02ccb/uddi-tck/src/test/java/org/apache/juddi/gui/test/BaseTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/gui/test/BaseTest.java b/uddi-tck/src/test/java/org/apache/juddi/gui/test/BaseTest.java
new file mode 100644
index 0000000..5fa92f1
--- /dev/null
+++ b/uddi-tck/src/test/java/org/apache/juddi/gui/test/BaseTest.java
@@ -0,0 +1,172 @@
+/*
+ * Copyright 2015 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juddi.gui.test;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.apache.commons.lang.SystemUtils;
+import org.apache.juddi.v3.client.config.UDDIClient;
+import org.apache.juddi.v3.client.config.UDDINode;
+import org.apache.juddi.v3.tck.TckCommon;
+import org.apache.juddi.v3.tck.TckPublisher;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import static org.junit.Assert.assertEquals;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.chrome.ChromeDriver;
+import org.openqa.selenium.edge.EdgeDriver;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.firefox.FirefoxProfile;
+import org.openqa.selenium.ie.InternetExplorerDriver;
+import org.openqa.selenium.opera.OperaDriver;
+import org.openqa.selenium.remote.DesiredCapabilities;
+import org.openqa.selenium.safari.SafariDriver;
+
+/**
+ *
+ * @author alex
+ */
+public abstract class BaseTest {
+
+ public static String BASE_URL = "http://localhost:8880/juddi-gui/";
+ public static final List<WebDriver> drivers = new ArrayList<>();
+
+ @BeforeClass
+ public static void setUpClass() {
+ if (!TckPublisher.isJUDDI())
+ return;
+ try {
+ UDDIClient client = new UDDIClient();
+ client.start();
+ UDDINode uddiNode = client.getClientConfig().getUDDINode("uddiv3");
+ BASE_URL = (String) uddiNode.getProperties().get("juddigui");
+ if (BASE_URL==null) {
+ BASE_URL = "http://localhost:8880/juddi-gui/";
+ }
+
+ } catch (Exception e) {
+ //we should not have any issues reading the config
+ e.printStackTrace();
+ Assert.fail();
+ }
+ //setup properties for driver locations....
+
+ boolean is64bit = System.getProperty("os.arch") != null && System.getProperty("os.arch").contains("64");
+ String arch = is64bit ? "64bit" : "32bit";
+ String os = "";
+ String executableExtension = "";
+ if (SystemUtils.IS_OS_WINDOWS) {
+ os = "windows";
+ executableExtension = ".exe";
+ }
+ if (SystemUtils.IS_OS_LINUX) {
+ os = "linux";
+ }
+ //TODO mac?
+
+ File driversPath = new File("drivers");
+
+ File chrome = new File(driversPath, os + "/googlechrome/" + arch + "/chromedriver" + executableExtension);
+ if (chrome.exists()) {
+ System.setProperty("webdriver.chrome.driver", chrome.getAbsolutePath());
+ }
+ File firefox = new File(driversPath, os + "/marionette/" + arch + "/geckodriver" + executableExtension);
+ if (firefox.exists()) {
+ System.setProperty("webdriver.gecko.driver", firefox.getAbsolutePath());
+ }
+
+ File ie = new File(driversPath, os + "/internetexplorer/" + arch + "/IEDriverServer" + executableExtension);
+ if (ie.exists()) {
+ System.setProperty("webdriver.ie.driver", ie.getAbsolutePath());
+ }
+ File edge = new File(driversPath, os + "/edge/" + arch + "/MicrosoftWebDriver" + executableExtension);
+ if (edge.exists()) {
+ System.setProperty("webdriver.edge.driver", edge.getAbsolutePath());
+ }
+
+ File opera = new File(driversPath, os + "/operachromium/" + arch + "/operadriver" + executableExtension);
+ if (opera.exists()) {
+ System.setProperty("webdriver.opera.driver", opera.getAbsolutePath());
+ }
+/*
+ try {
+ drivers.add(new SafariDriver());
+ } catch (Throwable ex) {
+ ex.printStackTrace();
+ }
+
+ try {
+ //DesiredCapabilities capabilities = DesiredCapabilities.chrome();
+ //capabilities.setCapability("chrome.switches", Arrays.asList("--incognito"));
+ drivers.add(new ChromeDriver());
+ } catch (Throwable ex) {
+ ex.printStackTrace();
+ }*/
+ try {
+ //FirefoxProfile firefoxProfile = new FirefoxProfile();
+ //firefoxProfile.setPreference("browser.privatebrowsing.autostart", true);
+ drivers.add(new FirefoxDriver());
+ } catch (Throwable ex) {
+ ex.printStackTrace();
+ }
+/*
+ try {
+ //DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
+ //capabilities.setCapability(InternetExplorerDriver.FORCE_CREATE_PROCESS, true);
+ //capabilities.setCapability(InternetExplorerDriver.IE_SWITCHES, "-private");
+ drivers.add(new InternetExplorerDriver());
+ } catch (Throwable ex) {
+ ex.printStackTrace();
+ }
+
+ try {
+
+ drivers.add(new EdgeDriver());
+ } catch (Throwable ex) {
+ ex.printStackTrace();
+ }
+ try {
+
+ drivers.add(new OperaDriver());
+ } catch (Throwable ex) {
+ ex.printStackTrace();
+ }
+*/
+ }
+
+ @AfterClass
+ public static void tearDownClass() {
+ for (int i = 0; i < drivers.size(); i++) {
+ drivers.get(i).close();
+ }
+ drivers.clear();
+ }
+
+ @Before
+ public void setUp() {
+ }
+
+ @After
+ public void tearDown() {
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/juddi/blob/6ee02ccb/uddi-tck/src/test/java/org/apache/juddi/gui/test/login/LoginIntegrationTest.java
----------------------------------------------------------------------
diff --git a/uddi-tck/src/test/java/org/apache/juddi/gui/test/login/LoginIntegrationTest.java b/uddi-tck/src/test/java/org/apache/juddi/gui/test/login/LoginIntegrationTest.java
new file mode 100644
index 0000000..bbfbb20
--- /dev/null
+++ b/uddi-tck/src/test/java/org/apache/juddi/gui/test/login/LoginIntegrationTest.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2015 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juddi.gui.test.login;
+
+import org.apache.juddi.gui.test.BaseTest;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Test;
+import org.openqa.selenium.By;
+
+/**
+ *
+ * @author alex
+ */
+public class LoginIntegrationTest extends BaseTest {
+
+ @Test
+ public void testSplashAndLoginLogout() throws Exception {
+ System.out.println("testSplashAndLoginLogout");
+ Assume.assumeFalse(drivers.isEmpty());
+ for (int i = 0; i < drivers.size(); i++) {
+ System.out.println("nav to " + BASE_URL);
+ drivers.get(i).navigate().to(BASE_URL);
+ if ((BASE_URL + "/home.jsp").equalsIgnoreCase(drivers.get(i).getCurrentUrl())) {
+ //already based the i18n screen
+ } else {
+ drivers.get(i).findElement(By.id("login_page_go")).click();
+ }
+ //make sure the gui is pointed to the right server.
+ drivers.get(i).navigate().to("javascript:switchNode('integrationTest')");
+
+ drivers.get(i).navigate().to(BASE_URL + "/home.jsp");
+
+ //todo put these in a props file
+ drivers.get(i).findElement(By.id("username")).sendKeys("juddi");
+ drivers.get(i).findElement(By.id("password")).sendKeys("juddi");
+ drivers.get(i).findElement(By.id("loginbutton")).click();
+ Assert.assertTrue(drivers.get(i).findElement(By.id("logout_button")).isDisplayed());
+ drivers.get(i).findElement(By.id("logout_button")).click();
+ try {
+ drivers.get(i).findElement(By.id("logout_button"));
+ Assert.fail("logout failed");
+ } catch (Exception ex) {
+ }
+
+ }
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org