]> source.dussan.org Git - archiva.git/commitdiff
adapt Selenium tests to run independently or different orders
authorBrett Porter <brett@apache.org>
Sun, 26 Jan 2014 13:47:29 +0000 (13:47 +0000)
committerBrett Porter <brett@apache.org>
Sun, 26 Jan 2014 13:47:29 +0000 (13:47 +0000)
Seems required by current configuration of Surefire

git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-1.3.x@1561487 13f79535-47bb-0310-9956-ffa450edef68

50 files changed:
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.jar [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.jar.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.jar.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.pom [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.pom.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.pom.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/maven-metadata.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/maven-metadata.xml.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/maven-metadata.xml.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar [deleted file]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar.md5 [deleted file]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar.sha1 [deleted file]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom [deleted file]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom.md5 [deleted file]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom.sha1 [deleted file]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml [deleted file]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml.md5 [deleted file]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml.sha1 [deleted file]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.jar [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.jar.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.jar.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.pom [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.pom.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.pom.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/maven-metadata.xml [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/maven-metadata.xml.md5 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/maven-metadata.xml.sha1 [new file with mode: 0644]
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/AppearanceTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java [deleted file]
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArtifactManagementTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/AuditLogsReportTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/BrowseTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/CSRFSecurityTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/DatabaseTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/FindArtifactTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/LegacySupportTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/LoginTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/NetworkProxiesTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ReportsTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryScanningTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/SearchTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/UserRolesTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/VirtualRepositoryTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/XSSSecurityTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractRepositoryTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/testng.properties

diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.jar b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.jar
new file mode 100644 (file)
index 0000000..eb0ce95
Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.jar differ
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.jar.md5
new file mode 100644 (file)
index 0000000..df6f495
--- /dev/null
@@ -0,0 +1 @@
+e391148b557852624203d657b1e41085
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.jar.sha1
new file mode 100644 (file)
index 0000000..2868e37
--- /dev/null
@@ -0,0 +1 @@
+76a2f2eacbccb422c7a42ae22ab2a627f7d33b46
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.pom b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.pom
new file mode 100644 (file)
index 0000000..486955a
--- /dev/null
@@ -0,0 +1,25 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>searchGroup</groupId>
+  <artifactId>searchArtifactId</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+
+  <name>searchArtifactId</name>
+  <url>http://maven.apache.org</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.pom.md5
new file mode 100644 (file)
index 0000000..f956ae0
--- /dev/null
@@ -0,0 +1 @@
+e2e05fa5402d165ef455f7c6e793535a
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/1.0/searchArtifactId-1.0.pom.sha1
new file mode 100644 (file)
index 0000000..b0dec01
--- /dev/null
@@ -0,0 +1 @@
+4f18ae89b60c727ed1b0046f18ba0a4edc6b7cbe
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/maven-metadata.xml
new file mode 100644 (file)
index 0000000..9dd39c6
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>searchGroup</groupId>
+  <artifactId>searchArtifactId</artifactId>
+  <versioning>
+    <release>1.0</release>
+    <versions>
+      <version>1.0</version>
+    </versions>
+    <lastUpdated>20140126133747</lastUpdated>
+  </versioning>
+</metadata>
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/maven-metadata.xml.md5
new file mode 100644 (file)
index 0000000..ff36d26
--- /dev/null
@@ -0,0 +1 @@
+c124fd7ce60fd49acbe3cda525f93975
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/searchGroup/searchArtifactId/maven-metadata.xml.sha1
new file mode 100644 (file)
index 0000000..5e4fa30
--- /dev/null
@@ -0,0 +1 @@
+4a9424a71b8b6ebc85ad548f0e68d20bdf15f07d
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar
deleted file mode 100644 (file)
index d98bcfb..0000000
Binary files a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar and /dev/null differ
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar.md5
deleted file mode 100644 (file)
index 7359be6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ea7dea9244b2a0975cfa117dc34fe18e
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.jar.sha1
deleted file mode 100644 (file)
index 45ec678..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1039566ff5361d07eccd1243c45929b96441c7d6
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom
deleted file mode 100644 (file)
index cbec598..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>test</groupId>
-  <artifactId>test</artifactId>
-  <packaging>jar</packaging>
-  <version>1.0</version>
-  <name>test</name>
-  <url>http://maven.apache.org</url>
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-<distributionManagement>
-<repository>
-  <id>test</id>
-<url>file://localhost/Users/brett/scm/archiva/archiva/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal</url>
-</repository>
-</distributionManagement>
-</project>
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom.md5
deleted file mode 100644 (file)
index 3b20276..0000000
+++ /dev/null
@@ -1 +0,0 @@
-f80c7c493716de649a99db00cd2ff34c
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/1.0/test-1.0.pom.sha1
deleted file mode 100644 (file)
index d7c0922..0000000
+++ /dev/null
@@ -1 +0,0 @@
-4b95c6fa09d1e02efdb69129f53f025e33bc8958
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml
deleted file mode 100644 (file)
index 68287fd..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<metadata>
-  <groupId>test</groupId>
-  <artifactId>test</artifactId>
-  <version>1.0</version>
-  <versioning>
-    <versions>
-      <version>1.0</version>
-    </versions>
-    <lastUpdated>20100114015837</lastUpdated>
-  </versioning>
-</metadata>
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml.md5
deleted file mode 100644 (file)
index 4bb9667..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dab1b8c2475fe839f387ceaef0d82b30
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/test/maven-metadata.xml.sha1
deleted file mode 100644 (file)
index f002683..0000000
+++ /dev/null
@@ -1 +0,0 @@
-4e5b414d5419121ef75131cb52235a9abbf2095a
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.jar b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.jar
new file mode 100644 (file)
index 0000000..cbb7a8f
Binary files /dev/null and b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.jar differ
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.jar.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.jar.md5
new file mode 100644 (file)
index 0000000..ebc4413
--- /dev/null
@@ -0,0 +1 @@
+3f01a41f9beb52c19553bd675c00777d
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.jar.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.jar.sha1
new file mode 100644 (file)
index 0000000..84bf41d
--- /dev/null
@@ -0,0 +1 @@
+8f74238687dd8d4d4d5a238dff836349f44a8a0b
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.pom b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.pom
new file mode 100644 (file)
index 0000000..e3f1767
--- /dev/null
@@ -0,0 +1,25 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>test</groupId>
+  <artifactId>testExisting</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+
+  <name>testExisting</name>
+  <url>http://maven.apache.org</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.pom.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.pom.md5
new file mode 100644 (file)
index 0000000..a2a4597
--- /dev/null
@@ -0,0 +1 @@
+48c2a0b28513ff1076640040c5b53595
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.pom.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/1.0/testExisting-1.0.pom.sha1
new file mode 100644 (file)
index 0000000..ff75e1d
--- /dev/null
@@ -0,0 +1 @@
+e70f597ca808a93027d0b527c7f0ce5d06cbbadf
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/maven-metadata.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/maven-metadata.xml
new file mode 100644 (file)
index 0000000..ea91eb9
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>test</groupId>
+  <artifactId>testExisting</artifactId>
+  <versioning>
+    <release>1.0</release>
+    <versions>
+      <version>1.0</version>
+    </versions>
+    <lastUpdated>20140126134048</lastUpdated>
+  </versioning>
+</metadata>
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/maven-metadata.xml.md5 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/maven-metadata.xml.md5
new file mode 100644 (file)
index 0000000..377ae96
--- /dev/null
@@ -0,0 +1 @@
+dcb219263cc293060cc1f44a170a2c74
\ No newline at end of file
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/maven-metadata.xml.sha1 b/archiva-modules/archiva-web/archiva-webapp-test/src/test/it-resources/appserver-base/data/repositories/internal/test/testExisting/maven-metadata.xml.sha1
new file mode 100644 (file)
index 0000000..f549981
--- /dev/null
@@ -0,0 +1 @@
+5f0d0f86a8bdd4ca756117414204cd6ee44de0b3
\ No newline at end of file
index 0a400e8b3d1e248baef55889a8ce57bd7a8b979a..07d14cb56183bb332680e1867e7e0703d3c72706 100644 (file)
@@ -20,12 +20,19 @@ package org.apache.archiva.web.test;
  */
 
 import org.apache.archiva.web.test.parent.AbstractArchivaTest;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-@Test(groups = { "appearance" }, dependsOnGroups = "login", sequential = true)
+@Test(groups = { "appearance" }, sequential = true)
 public class AppearanceTest
     extends AbstractArchivaTest
 {
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
+
     public void testAddAppearanceEmptyValues()
     {
         goToAppearancePage();
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java
deleted file mode 100644 (file)
index e5a02bd..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.apache.archiva.web.test;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-import org.apache.archiva.web.test.parent.AbstractArchivaTest;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeSuite;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Optional;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
-
-@Test( groups = { "about" }, alwaysRun = true )
-public class ArchivaAdminTest 
-       extends AbstractArchivaTest
-{
-
-    @Override
-    @AfterTest
-    public void close()
-        throws Exception
-    {
-        super.close();
-    }
-
-    @Override
-    @BeforeSuite
-    public void open()
-        throws Exception
-    {
-        super.open();
-    }
-       
-    @BeforeTest
-    @Parameters( { "baseUrl", "browser", "seleniumHost", "seleniumPort" } )
-    public void initializeArchiva( String baseUrl, String browser, @Optional( "localhost" ) String seleniumHost, @Optional( "4444" ) int seleniumPort ) throws Exception
-    {
-        super.open( baseUrl, browser, seleniumHost, seleniumPort );
-        getSelenium().open( baseUrl );
-        String title = getSelenium().getTitle();
-        if ( title.endsWith( "Create Admin User" ) )
-        {
-            assertCreateAdmin();
-            String fullname = getProperty( "ADMIN_FULLNAME" );
-            String username = getProperty( "ADMIN_USERNAME" );
-            String mail = getProperty( "ADMIN_EMAIL" );
-            String password = getProperty( "ADMIN_PASSWORD" );
-            submitAdminData( fullname, mail, password );
-            assertUserLoggedIn( username );
-            submit();
-            clickLinkWithText( "Logout" );
-       }
-    }
-
-}
index 93ac71c14e25d67c0a65d81a84984665e0d065ab..57bb4c6da603694762affa544e2a0e9fd27160c9 100644 (file)
@@ -20,15 +20,25 @@ package org.apache.archiva.web.test;
  */
 
 import org.apache.archiva.web.test.parent.AbstractArtifactManagementTest;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "artifactmanagement" }, dependsOnGroups = "login" )
+@Test( groups = { "artifactmanagement" } )
 public class ArtifactManagementTest
        extends AbstractArtifactManagementTest
 {
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
 
-       
-       public void testAddArtifactNullValues()
+    public void tearDown()
+    {
+        deleteArtifact( getGroupId(), "testAddArtifactValidValues", getVersion(), getRepositoryId() );
+    }
+
+    public void testAddArtifactNullValues()
        {
                goToAddArtifactPage();
                clickButtonWithValue( "Submit" );
@@ -86,7 +96,7 @@ public class ArtifactManagementTest
     @Test(groups = "requiresUpload")
        public void testAddArtifactValidValues()
        {
-               addArtifact( getGroupId() , "testAddArtifactValidValues", getVersion(), getPackaging() , getArtifactFilePath(), getRepositoryId() );
+               addArtifact( getGroupId() , "testAddArtifactValidValues", getVersion(), getPackaging(), getArtifactFilePath(), getRepositoryId() );
                assertTextPresent( "Artifact 'test:testAddArtifactValidValues:1.0' was successfully deployed to repository 'internal'" );
        }
                
@@ -94,7 +104,7 @@ public class ArtifactManagementTest
     @Test(groups = "requiresUpload")
        public void testAddArtifactBlockRedeployments()
        {
-            addArtifact( getGroupId() , getArtifactId(), getVersion(), getPackaging() , getArtifactFilePath(), getRepositoryId() );
+            addArtifact( getGroupId() , getProperty( "ARTIFACT_ARTIFACTID" ), getVersion(), getPackaging() , getArtifactFilePath(), getRepositoryId() );
             assertTextPresent( "Overwriting released artifacts in repository '" + getRepositoryId() + "' is not allowed." );
        }
        
index c97b3354538ce18c2efaf04205aa856663d6fe01..0bf98d022bf09ed7b1485e5e53407237cce2d614 100644 (file)
@@ -19,23 +19,31 @@ package org.apache.archiva.web.test;
  * under the License.
  */
 
-import org.apache.archiva.web.test.parent.AbstractArchivaTest;
+import org.apache.archiva.web.test.parent.AbstractArtifactManagementTest;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "auditlogsreport" }, dependsOnGroups = {"login", "artifactmanagement", "userroles"} )
+@Test( groups = { "auditlogsreport" } )
 public class AuditLogsReportTest
-    extends AbstractArchivaTest
+    extends AbstractArtifactManagementTest
 {
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+        addArtifact( getGroupId(), "testAudit", getVersion(), getPackaging(), getArtifactFilePath(), getRepositoryId() );
+    }
+
     private void goToAuditLogReports()
     {
         getSelenium().open( "/archiva/report/queryAuditLogReport.action" );
     }
-    
+
     private void assertAuditLogsReportPage()
-    {   
+    {
         assertPage( "Apache Archiva \\ Audit Log Report" );
         assertTextPresent( "Audit Log Report" );
-        
+
         assertElementPresent( "repository" );
         assertElementPresent( "groupId" );
         assertElementPresent( "artifactId" );
@@ -44,88 +52,88 @@ public class AuditLogsReportTest
         assertElementPresent( "rowCount" );
         assertButtonWithValuePresent( "View Audit Log" );
     }
-    
+
     @Test
     public void testAuditLogsReport()
     {
-        goToAuditLogReports();        
+        goToAuditLogReports();
         assertAuditLogsReportPage();
         assertTextPresent( "Latest Events" );
     }
-    
+
     @Test
     public void testViewAuditLogsNoDataFound()
     {
-        goToAuditLogReports();        
+        goToAuditLogReports();
         assertAuditLogsReportPage();
-        
+
         setFieldValue( "groupId", "non.existing" );
         submit();
-        
-        assertPage( "Apache Archiva \\ Audit Log Report" );   
+
+        assertPage( "Apache Archiva \\ Audit Log Report" );
         assertTextPresent( "Results" );
         assertTextPresent( "No audit logs found." );
-    }    
-    
+    }
+
     // TODO: add test for adding via WebDAV
     @Test (groups = "requiresUpload")
     public void testViewAuditLogsDataFound()
     {
-        goToAuditLogReports();        
+        goToAuditLogReports();
         assertAuditLogsReportPage();
-        
+
         selectValue( "repository", "internal" );
         setFieldValue( "groupId", "test" );
         submit();
-                
+
         assertAuditLogsReportPage();
         assertTextPresent( "Results" );
         assertTextNotPresent( "No audit logs found." );
-        assertTextPresent( "testAddArtifactValidValues-1.0.jar" );
+        assertTextPresent( "testAudit-1.0.jar" );
         assertTextPresent( "Uploaded File" );
         assertTextPresent( "internal" );
         assertTextPresent( "admin" );
     }
-    
+
     // TODO: add test for adding via WebDAV
     @Test ( groups = "requiresUpload")
     public void testViewAuditLogsOnlyArtifactIdIsSpecified()
     {
-        goToAuditLogReports();        
+        goToAuditLogReports();
         assertAuditLogsReportPage();
-        
+
         selectValue( "repository", "internal" );
         setFieldValue( "artifactId", "test" );
         submit();
-                
+
         assertAuditLogsReportPage();
         assertTextPresent( "Results" );
         assertTextNotPresent( "No audit logs found." );
-        assertTextPresent( "testAddArtifactValidValues-1.0.jar" );
+        assertTextPresent( "testAudit-1.0.jar" );
         assertTextPresent( "Uploaded File" );
         assertTextPresent( "internal" );
         assertTextPresent( "admin" );
     }
-    
+
     // TODO: add test for adding via WebDAV
     @Test (groups = "requiresUpload")
     public void testViewAuditLogsForAllRepositories()
     {
-        goToAuditLogReports();        
+        goToAuditLogReports();
         assertAuditLogsReportPage();
-        
+
         selectValue( "repository", "all" );
         submit();
-        
+
         assertAuditLogsReportPage();
         assertTextPresent( "Results" );
         assertTextNotPresent( "No audit logs found." );
-        assertTextPresent( "testAddArtifactValidValues-1.0.jar" );
+        assertTextPresent( "testAudit-1.0.jar" );
         assertTextPresent( "Uploaded File" );
         assertTextPresent( "internal" );
         assertTextPresent( "admin" );
     }
-    
+
     @Test (groups = "requiresUpload")
     public void testViewAuditLogsViewAuditEventsForManageableRepositoriesOnly()
     {
@@ -134,14 +142,26 @@ public class AuditLogsReportTest
         String version = getProperty( "SNAPSHOT_VERSION" );
         String repo = getProperty( "SNAPSHOT_REPOSITORYID" );
         String packaging = getProperty( "SNAPSHOT_PACKAGING" );
-        
-        addArtifact( groupId, artifactId, version, packaging, getProperty( "SNAPSHOT_ARTIFACTFILEPATH" ), repo );        
+
+        addArtifact( groupId, artifactId, version, packaging, getProperty( "SNAPSHOT_ARTIFACTFILEPATH" ), repo );
         assertTextPresent( "Artifact '" + groupId + ":" + artifactId + ":" + version +
-            "' was successfully deployed to repository '" + repo + "'" );
-        
-        clickLinkWithText( "Logout" );
-                
-        login( getProperty( "REPOMANAGER_INTERNAL_USERNAME" ), getUserRoleNewPassword() );
+                               "' was successfully deployed to repository '" + repo + "'" );
+
+        goToUserManagementPage();
+        String username = "testAuditUser";
+        if ( !isLinkPresent( username ) )
+        {
+            createUserWithRole( username, "Repository Manager - internal", getUserEmail(), getUserRolePassword() );
+
+            logout();
+            login( username, getUserRolePassword() );
+            changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        }
+        else
+        {
+            logout();
+            login( username, getUserRoleNewPassword() );
+        }
 
         goToAuditLogReports();
         assertAuditLogsReportPage();
@@ -152,16 +172,16 @@ public class AuditLogsReportTest
         assertAuditLogsReportPage();
         assertTextPresent( "Results" );
         assertTextNotPresent( "No audit logs found." );
-        assertTextPresent( "testAddArtifactValidValues-1.0.jar" );
+        assertTextPresent( "testAudit-1.0.jar" );
         assertTextPresent( "Uploaded File" );
         assertTextPresent( "internal" );
         assertTextPresent( "admin" );
 
         assertTextNotPresent( artifactId + "-" + version + "." + packaging );
         clickLinkWithText( "Logout" );
-        login( getProperty( "ADMIN_USERNAME" ), getProperty( "ADMIN_PASSWORD" ) );
+        loginAsAdmin();
     }
-    
+
     @Test ( groups = "requiresUpload")
     public void testViewAuditLogsReportForGroupId()
     {
@@ -171,15 +191,15 @@ public class AuditLogsReportTest
         String packaging = getProperty("PACKAGING");
         String repositoryId = getProperty("REPOSITORYID");
         String expectedArtifact = getProperty("AUDITLOG_EXPECTED_ARTIFACT");
-               
+
         addArtifact( groupId, artifactId, version, packaging,  getProperty( "SNAPSHOT_ARTIFACTFILEPATH" ), repositoryId );
-                       
+
         goToAuditLogReports();
-                       
+
         selectValue( "repository", repositoryId );
         setFieldValue( "groupId", groupId );
         submit();
-                       
+
         assertAuditLogsReportPage();
         assertTextPresent( expectedArtifact );
         assertTextPresent( repositoryId );
index 76841fb2d3f59700aea01233ba1c45d0476a251e..3fb21673857d4d1b4d14dfaf935fde64fadb1651 100644 (file)
@@ -23,14 +23,20 @@ import java.io.File;
 
 import org.apache.archiva.web.test.parent.AbstractBrowseTest;
 import org.testng.Assert;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "browse" }, dependsOnGroups = {"login","artifactmanagement"} )
+@Test( groups = { "browse" } )
 public class BrowseTest 
        extends AbstractBrowseTest
 {
-       
-       public void testBrowseArtifact()
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
+
+    public void testBrowseArtifact()
        {
                goToBrowsePage();
                assertBrowsePage();
@@ -41,7 +47,7 @@ public class BrowseTest
        {
                goToBrowsePage();
                assertBrowsePage();
-               clickLinkWithText( getProperty( "ARTIFACT_ARTIFACTID" ) + "/" );
+               clickLinkWithText( getProperty( "ARTIFACT_GROUPID" ) + "/" );
                assertPage( "Apache Archiva \\ Browse Repository" );
                assertTextPresent( "Artifacts" );
        }
index 8aa7ff5db248f82bcd9899f72fd3bd8b3bf548b7..d5a16dc113cc4558e1cf0755b0a803bdc3614fb5 100644 (file)
@@ -20,15 +20,22 @@ package org.apache.archiva.web.test;
  */
 
 import org.apache.archiva.web.test.parent.AbstractArchivaTest;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
 /**
  * Test all actions affected with CSRF security issue.
  */
-@Test( groups = { "csrf" }, dependsOnGroups = "login", sequential = true )
+@Test( groups = { "csrf" }, sequential = true )
 public class CSRFSecurityTest
     extends AbstractArchivaTest
 {
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
+
     public void testCSRFDeleteRepository()
     {
         getSelenium().open( baseUrl );
index ffa78e9940a7f4316ce0d1ebd773415646c06630..80cef191088e2189a6dd75061de9dfd97ae0e523 100644 (file)
@@ -20,13 +20,20 @@ package org.apache.archiva.web.test;
  */
 
 import org.apache.archiva.web.test.parent.AbstractRepositoryTest;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "database" }, dependsOnGroups = "login", sequential = true )
+@Test( groups = { "database" }, sequential = true )
 public class DatabaseTest
        extends AbstractRepositoryTest
 {
-       public void testUpdateCron_NullValue()
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
+
+    public void testUpdateCron_NullValue()
        {
                goToDatabasePage();
                setFieldValue( "database_cron" , "");
index 17d426e6c3b769a5c7ecc20f8fe2fd82346c24fc..fb182da25a9adad5fee58abe37f7c0b19db3e4f3 100644 (file)
@@ -20,13 +20,20 @@ package org.apache.archiva.web.test;
  */
 
 import org.apache.archiva.web.test.parent.AbstractArchivaTest;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "findartifact" }, dependsOnGroups = "login", sequential = true )
+@Test( groups = { "findartifact" }, sequential = true )
 public class FindArtifactTest
        extends AbstractArchivaTest
 {
-       public void testFindArtifactNullValues()
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
+
+    public void testFindArtifactNullValues()
        {
                goToFindArtifactPage();
                clickButtonWithValue( "Search" );
index ba8b78f5d2959eec6fff71b9ad6d7d7a5a97aafe..a1f30194d33bb082573d35a90ef2b17c25a67b54 100644 (file)
@@ -20,13 +20,20 @@ package org.apache.archiva.web.test;
  */
 
 import org.apache.archiva.web.test.parent.AbstractArtifactManagementTest;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "legacysupport" }, dependsOnGroups = "login", sequential = true )
-public class LegacySupportTest 
+@Test( groups = { "legacysupport" }, sequential = true )
+public class LegacySupportTest
        extends AbstractArtifactManagementTest
 {
-       public void testAddLegacyArtifact_NullValues()
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
+
+    public void testAddLegacyArtifact_NullValues()
        {
                goToLegacySupportPage();
                clickLinkWithText( "Add" );
index ccbeceb3dad66466c2e3ae066e9486afc4941122..f980efc0d6da09bc09e42fe49e168b3c769c64db 100644 (file)
@@ -36,7 +36,7 @@ import org.testng.annotations.Test;
  * @version $Id$
  */
 
-@Test ( groups = { "login" }, dependsOnGroups = "about")
+@Test ( groups = { "login" } )
 public class LoginTest 
        extends AbstractArchivaTest
 {
@@ -52,11 +52,7 @@ public class LoginTest
     @Test( dependsOnMethods = { "testWithBadUsername" }, alwaysRun = true )
     public void testWithBadPassword()
     {
-        goToLoginPage();
-        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
-        getSelenium().type( "loginForm_password", "badPassword" );
-        getSelenium().click( "loginForm__login" );
-        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        login( getProperty( "ADMIN_USERNAME" ), "badPassword", false, "Login Page" );
         assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
@@ -83,28 +79,9 @@ public class LoginTest
     @Test( groups = { "loginSuccess" }, dependsOnMethods = { "testWithEmptyPassword" }, alwaysRun = true )
     public void testWithCorrectUsernamePassword()
     {
-        goToLoginPage();
-        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
-        getSelenium().type( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
-        getSelenium().click( "loginForm__login" );
-        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        loginAsAdmin();
         assertTextPresent( "Edit Details" );
         assertTextPresent( "Logout" );
         assertTextPresent( getProperty( "ADMIN_USERNAME" ) );
     }
-       
-       @BeforeTest
-    public void open()
-        throws Exception
-    {
-        super.open();
-    }
-
-    @Override
-    @AfterTest
-    public void close()
-        throws Exception
-    {
-        super.close();
-    }
 }
index 846417decc8c195f6954df26579d4c49fceceb87..e0e7d70a0b417b6115d12c2c78c7b00039894355 100644 (file)
@@ -20,13 +20,20 @@ package org.apache.archiva.web.test;
  */
 
 import org.apache.archiva.web.test.parent.AbstractRepositoryTest;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "networkproxies" }, dependsOnGroups = {"login","virtualrepository"})
+@Test( groups = { "networkproxies" })
 public class NetworkProxiesTest 
        extends AbstractRepositoryTest
 {
-       @Test
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
+
+    @Test
        public void testAddNetworkProxyNullValues()
        {
                goToNetworkProxiesPage();
index 496cc34edee0b90ff604c34420fbd4730b71b7ba..712586018b395db4726e15e8c5b6500cb0aa508a 100644 (file)
@@ -20,13 +20,20 @@ package org.apache.archiva.web.test;
  */
 
 import org.apache.archiva.web.test.parent.AbstractArtifactReportsTest;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "reports" }, dependsOnGroups = "login")
+@Test( groups = { "reports" })
 public class ReportsTest 
        extends AbstractArtifactReportsTest
 {
-       //TODO Tests for repository with defects
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
+
+    //TODO Tests for repository with defects
        
        public void testRepoStatisticsWithoutRepoCompared()
        {
index aa4e90285bc804ba35e55c89ea394b9cd47c1152..a204a3d5dc3843a17c6e07deafb5130d418093ea 100644 (file)
@@ -20,14 +20,21 @@ package org.apache.archiva.web.test;
  */
 
 import org.apache.archiva.web.test.parent.AbstractRepositoryTest;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 import org.testng.Assert;
 
-@Test( groups = { "reposcan" }, dependsOnGroups = "login", sequential = true )
+@Test( groups = { "reposcan" }, sequential = true )
 public class RepositoryScanningTest 
        extends AbstractRepositoryTest
 {
-       public void testAddArtifactFileType_NullValue()
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
+
+    public void testAddArtifactFileType_NullValue()
        {
                goToRepositoryScanningPage();
                clickAddIcon( "newpattern_0" );
index c1c744efe5a41a89adebe9da443769fe698e8ca4..d5b8a7553b817326de0a3ea4aeae15475ca2297f 100644 (file)
@@ -20,19 +20,36 @@ package org.apache.archiva.web.test;
  */
 
 import org.apache.archiva.web.test.parent.AbstractRepositoryTest;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "repository" }, dependsOnGroups = "login", sequential = true )
+@Test( groups = { "repository" }, sequential = true )
 public class RepositoryTest
        extends AbstractRepositoryTest
 {
-       public void testAddManagedRepoValidValues()
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
+
+    @AfterSuite
+    public void tearDown()
+    {
+        goToRepositoriesPage();
+        deleteManagedRepository( "managedrepo1", false );
+        deleteManagedRepository( "managedrepo", false );
+        deleteRemoteRepository( "remoterepo", false );
+    }
+
+    public void testAddManagedRepoValidValues()
        {
                goToRepositoriesPage();
                getSelenium().open( "/archiva/admin/addRepository.action" );
                addManagedRepository( "managedrepo1", "Managed Repository Sample 1" , getRepositoryDir() + "repository/" , "", "Maven 2.x Repository", "0 0 * * * ?", "", "" );
                clickButtonWithValue( "Save" );
-               assertTextPresent( "Managed Repository Sample 1" );             
+               assertTextPresent( "Managed Repository Sample 1" );
                assertRepositoriesPage();
        }
 
@@ -95,44 +112,44 @@ public class RepositoryTest
 
        @Test(dependsOnMethods = { "testAddManagedRepoInvalidDaysOlder" } )
        public void testAddManagedRepoBlankValues()
-       {                               
+       {
                goToRepositoriesPage();
-               getSelenium().open( "/archiva/admin/addRepository.action" );    ;       
+               getSelenium().open( "/archiva/admin/addRepository.action" );    ;
                addManagedRepository( "", "" , "" , "", "Maven 2.x Repository", "", "", "" );
                assertTextPresent( "You must enter a repository identifier." );
                assertTextPresent( "You must enter a repository name." );
                assertTextPresent( "You must enter a directory." );
                assertTextPresent( "Invalid cron expression." );
        }
-       
+
        @Test(dependsOnMethods = { "testAddManagedRepoBlankValues" } )
        public void testAddManagedRepoNoIdentifier()
-       {               
+       {
                addManagedRepository( "", "name" , "/home" , "/.index", "Maven 2.x Repository", "0 0 * * * ?", "", "" );
                assertTextPresent( "You must enter a repository identifier." );
        }
-       
+
        @Test(dependsOnMethods = { "testAddManagedRepoNoIdentifier" } )
        public void testAddManagedRepoNoRepoName()
        {
                addManagedRepository( "identifier", "" , "/home" , "/.index", "Maven 2.x Repository", "0 0 * * * ?", "", "" );
                assertTextPresent( "You must enter a repository name." );
        }
-       
+
        @Test(dependsOnMethods = { "testAddManagedRepoNoRepoName" } )
        public void testAddManagedRepoNoDirectory()
        {
                addManagedRepository( "identifier", "name" , "" , "/.index", "Maven 2.x Repository", "0 0 * * * ?", "", "" );
                assertTextPresent( "You must enter a directory." );
        }
-       
+
        @Test(dependsOnMethods = { "testAddManagedRepoNoDirectory" } )
        public void testAddManagedRepoNoCron()
        {
                addManagedRepository( "identifier", "name" , "/home" , "/.index", "Maven 2.x Repository", "", "", "" );
                assertTextPresent( "Invalid cron expression." );
        }
-       
+
        @Test(dependsOnMethods = { "testAddManagedRepoNoCron" } )
        public void testAddManagedRepoForEdit()
        {
@@ -204,39 +221,38 @@ public class RepositoryTest
                editManagedRepository( "repository.name" , "Managed Repo" );
                assertTextPresent( "Managed Repository Sample" );
        }
-       
+
        //TODO
        @Test(dependsOnMethods = { "testEditManagedRepo" } )
        public void testDeleteManageRepo()
        {
-               deleteManagedRepository();
-               //assertTextNotPresent( "managedrepo" );
+               deleteManagedRepository( "managedrepo", true );
        }
-       
+
        @Test(dependsOnMethods = { "testAddRemoteRepoValidValues" } )
        public void testAddRemoteRepoNullValues()
-       {               
+       {
            getSelenium().open( "/archiva/admin/addRemoteRepository.action" );
                addRemoteRepository( "" , "" , "" , "" , "" , "" , "Maven 2.x Repository" );
                assertTextPresent( "You must enter a repository identifier." );
                assertTextPresent( "You must enter a repository name." );
                assertTextPresent( "You must enter a url." );
        }
-       
+
        @Test(dependsOnMethods = { "testAddRemoteRepoNullValues" } )
        public void testAddRemoteRepositoryNullIdentifier()
        {
                addRemoteRepository( "" , "Remote Repository Sample" , "http://repository.codehaus.org/org/codehaus/mojo/" , "" , "" , "" , "Maven 2.x Repository" );
                assertTextPresent( "You must enter a repository identifier." );
        }
-       
+
        @Test(dependsOnMethods = { "testAddRemoteRepositoryNullIdentifier" } )
        public void testAddRemoteRepoNullName()
        {
                addRemoteRepository( "remoterepo" , "" , "http://repository.codehaus.org/org/codehaus/mojo/" , "" , "" , "" , "Maven 2.x Repository" );
                assertTextPresent( "You must enter a repository name." );
        }
-       
+
        @Test(dependsOnMethods = { "testAddRemoteRepoNullName" } )
        public void testAddRemoteRepoNullURL()
        {
@@ -246,26 +262,26 @@ public class RepositoryTest
 
        @Test(dependsOnMethods = { "testDeleteManageRepo" } )
        public void testAddRemoteRepoValidValues()
-       {               
+       {
                getSelenium().open( "/archiva/admin/addRemoteRepository.action" );
                addRemoteRepository( "remoterepo" , "Remote Repository Sample" , "http://repository.codehaus.org/org/codehaus/mojo/" , "" , "" , "" , "Maven 2.x Repository" );
                assertTextPresent( "Remote Repository Sample" );
        }
-    
+
     // *** BUNDLED REPOSITORY TEST ***
-    
+
     @Test ( dependsOnMethods = { "testWithCorrectUsernamePassword" }, alwaysRun = true )
     public void testBundledRepository()
     {
         String repo1 = baseUrl + "repository/internal/";
         String repo2 = baseUrl + "repository/snapshots/";
-        
+
         assertRepositoryAccess( repo1 );
         assertRepositoryAccess( repo2 );
-        
+
         getSelenium().open( "/archiva" );
     }
-    
+
     private void assertRepositoryAccess( String repo )
     {
         getSelenium().open( "/archiva" );
index 7a0ac36b15c905f9104aedaf143a6c82afe96a8d..b2760d0d57c5611c0c25b2d86f5d69693648b928 100644 (file)
@@ -22,14 +22,20 @@ package org.apache.archiva.web.test;
 import java.io.File;
 
 import org.apache.archiva.web.test.parent.AbstractSearchTest;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "search" }, dependsOnGroups = "login" )
+@Test( groups = { "search" } )
 public class SearchTest 
        extends AbstractSearchTest
 {
-       
-       public void testSearchNonExistingArtifact()
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
+
+    public void testSearchNonExistingArtifact()
                throws Exception
        {
                searchForArtifact( getProperty( "SEARCH_BAD_ARTIFACT" ) );
@@ -38,19 +44,19 @@ public class SearchTest
     
        public void testSearchExistingArtifact()
        {
-               searchForArtifact( getProperty( "ARTIFACT_ARTIFACTID" ) );
+               searchForArtifact( "searchArtifactId" );
                assertTextPresent( "Results" );
                assertTextPresent( "Hits: 1 to 1 of 1" );
-               assertLinkPresent( "test" );
+               assertLinkPresent( "searchArtifactId" );
        }
        
        public void testViewSearchedArtifact()
     {
-               searchForArtifact( getProperty( "ARTIFACT_ARTIFACTID" ) );
-               clickLinkWithText( getProperty( "ARTIFACT_ARTIFACTID" ) );
+               searchForArtifact( "searchArtifactId" );
+               clickLinkWithText( "searchArtifactId" );
                assertPage( "Apache Archiva \\ Browse Repository" );
-               assertTextPresent( getProperty( "ARTIFACT_ARTIFACTID" ) );
-               clickLinkWithText( getProperty( "ARTIFACT_VERSION" ) + "/"  );
+               assertTextPresent( "searchArtifactId" );
+               clickLinkWithText( "1.0/"  );
                assertPage( "Apache Archiva \\ Browse Repository" );
     }
        
@@ -68,27 +74,27 @@ public class SearchTest
 
     public void testSearchExistingArtifactUsingAdvancedSearchArtifactId()
     {
-        searchForArtifactAdvancedSearch( null, getProperty( "ARTIFACT_ARTIFACTID" ), null, getProperty( "REPOSITORYID" ), null, null );
+        searchForArtifactAdvancedSearch( null, "searchArtifactId", null, getProperty( "REPOSITORYID" ), null, null );
                assertTextPresent( "Results" );
                assertTextPresent( "Hits: 1 to 1 of 1" );
-               assertLinkPresent( "test" );   
+               assertLinkPresent( "searchArtifactId" );
     }
     
     public void testSearchExistingArtifactUsingAdvancedSearchGroupId()
     {
-        searchForArtifactAdvancedSearch( getProperty( "GROUPID" ), null, null, getProperty( "REPOSITORYID" ), null, null );
+        searchForArtifactAdvancedSearch( "searchGroup", null, null, getProperty( "REPOSITORYID" ), null, null );
         assertTextPresent( "Results" );
         assertTextPresent( "Hits: 1 to 1 of 1" );
-        assertLinkPresent( "test" );   
+        assertLinkPresent( "searchGroup" );
     }
     
     public void testSearchExistingArtifactUsingAdvancedSearchNotInRepository()
     {
-        searchForArtifactAdvancedSearch( null, getProperty( "ARTIFACT_ARTIFACTID" ), null, "snapshots", null, null );
+        searchForArtifactAdvancedSearch( null, "searchArtifactId", null, "snapshots", null, null );
         assertTextPresent( "No results found" );
         assertTextNotPresent( "Results" );
         assertTextNotPresent( "Hits: 1 to 1 of 1" );
-        assertLinkNotPresent( "test" );   
+        assertLinkNotPresent( "searchArtifactId" );
     }
 }
 
index db82aeb0eeeea7802d8211dce1d3d547c9e2a7ba..df074304bcd163a452f7d09bb81ae398f92e706b 100644 (file)
@@ -20,14 +20,20 @@ package org.apache.archiva.web.test;
  */
 
 import org.apache.archiva.web.test.parent.AbstractArchivaTest;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "userroles" }, dependsOnGroups = "login")
+@Test( groups = { "userroles" })
 public class UserRolesTest 
        extends AbstractArchivaTest
 {
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
 
-       public void testBasicAddDeleteUser()
+    public void testBasicAddDeleteUser()
        {
                username = getProperty( "GUEST_USERNAME" );
                fullname = getProperty( "GUEST_FULLNAME" );
@@ -205,12 +211,8 @@ public class UserRolesTest
        {
                username = getProperty("REPOMANAGER_INTERNAL_USERNAME");
                fullname = getProperty("REPOMANAGER_INTERNAL_FULLNAME");
-               
-               createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-               clickLinkWithText( username );
-               clickLinkWithText( "Edit Roles" );
-               checkResourceRoleWithValue( fullname );
-               clickButtonWithValue( "Submit" );
+
+        createUserWithRole( username, fullname, getUserEmail(), getUserRolePassword() );
 
         logout();
         login(username, getUserRolePassword());
@@ -226,8 +228,8 @@ public class UserRolesTest
         logout();
         login( getAdminUsername() , getAdminPassword() );
        }
-       
-       /*@Test (dependsOnMethods = { "testUserWithRepoManagerInternalRole" } )
+
+    /*@Test (dependsOnMethods = { "testUserWithRepoManagerInternalRole" } )
        public void testUserWithRepoManagerSnapshotsRole()
        {
                username = getProperty("REPOMANAGER_SNAPSHOTS_USERNAME");
@@ -259,12 +261,8 @@ public class UserRolesTest
        {
                username = getProperty( "REPOOBSERVER_INTERNAL_USERNAME" );
                fullname = getProperty( "REPOOBSERVER_INTERNAL_FULLNAME" );
-               
-               createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-               clickLinkWithText( username );
-               clickLinkWithText( "Edit Roles" );
-               checkResourceRoleWithValue( fullname );
-               clickButtonWithValue( "Submit" );
+
+        createUserWithRole( username, fullname, getUserEmail(), getUserRolePassword() );
 
         logout();
         login(username, getUserRolePassword());
index 5d17bed9005301e71be9bacbafef84e875abb2a4..1e14bee559847a37e984363026f6ba2630140b82 100644 (file)
@@ -20,14 +20,21 @@ package org.apache.archiva.web.test;
  */
 
 import org.apache.archiva.web.test.parent.AbstractRepositoryTest;
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 import org.testng.Assert;
 
-@Test( groups = { "virtualrepository" }, dependsOnGroups = "login")
+@Test( groups = { "virtualrepository" })
 public class VirtualRepositoryTest 
        extends AbstractRepositoryTest
 {
-       public void testAddRepositoryGroupNullValue()
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
+
+    public void testAddRepositoryGroupNullValue()
        {
                addRepositoryGroup( " " );
                assertTextPresent( "Identifier field is required." );
index c4ebb47de4856484d192a34947eab2b610d9e5c4..410e432d4dcd01cf2537033d9ed897622a24e55e 100644 (file)
@@ -19,16 +19,23 @@ package org.apache.archiva.web.test;
  * under the License.
  */
 
+import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 import org.apache.archiva.web.test.parent.AbstractArchivaTest;
 
 /**
  * Test all actions affected with XSS security issue.
  */
-@Test( groups = { "xss" }, dependsOnGroups = "login", sequential = true )
+@Test( groups = { "xss" }, sequential = true )
 public class XSSSecurityTest
     extends AbstractArchivaTest
 {
+    @BeforeTest
+    public void setUp()
+    {
+        loginAsAdmin();
+    }
+
     public void testDeleteArtifactImmunityToURLCrossSiteScripting()
     {
         getSelenium().open( "/archiva/deleteArtifact!doDelete.action?groupId=\"/>1<script>alert('xss')</script>&artifactId=\"/>1<script>alert('xss')</script>&version=\"/>1<script>alert('xss')</script>&repositoryId=\"/>1<script>alert('xss')</script>");
index 0a7c9be71a136dcedbd0dc9cd58b0295a73c745b..af670f0e410aa15a37679577ab6491ea706e397e 100644 (file)
@@ -30,6 +30,7 @@ import org.apache.commons.io.FileUtils;
 import org.testng.ITestResult;
 import org.testng.TestListenerAdapter;
 import com.thoughtworks.selenium.Selenium;
+import org.testng.annotations.Listeners;
 
 public class CaptureScreenShotsListener
     extends TestListenerAdapter
index 265c3807e83a9c67e3efb63b145ff5e9ad3a8f21..e0e1587bf4d938f8e0c761c5893899df06af316c 100644 (file)
@@ -4,6 +4,11 @@ import java.io.File;
 import java.io.IOException;
 
 import org.apache.archiva.web.test.XPathExpressionUtil;
+import org.apache.archiva.web.test.listener.CaptureScreenShotsListener;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.Listeners;
+import org.testng.annotations.Optional;
+import org.testng.annotations.Parameters;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -24,6 +29,7 @@ import org.apache.archiva.web.test.XPathExpressionUtil;
  * under the License.
  */
 
+@Listeners(value = CaptureScreenShotsListener.class)
 public abstract class AbstractArchivaTest
     extends AbstractSeleniumTest
 {
@@ -31,6 +37,30 @@ public abstract class AbstractArchivaTest
 
     protected String fullname;
 
+    @BeforeSuite( alwaysRun = true )
+    @Parameters( { "baseUrl", "browser", "seleniumHost", "seleniumPort" } )
+    public void initializeArchiva( @Optional( "http://localhost:9696/archiva/" ) String baseUrl,
+                                   @Optional( "*firefox" ) String browser,
+                                   @Optional( "localhost" ) String seleniumHost,
+                                   @Optional( "4444" ) int seleniumPort ) throws Exception
+    {
+        super.open( baseUrl, browser, seleniumHost, seleniumPort );
+        getSelenium().open( baseUrl );
+        String title = getSelenium().getTitle();
+        if ( title.endsWith( "Create Admin User" ) )
+        {
+            assertCreateAdmin();
+            String fullname = getProperty( "ADMIN_FULLNAME" );
+            String username = getProperty( "ADMIN_USERNAME" );
+            String mail = getProperty( "ADMIN_EMAIL" );
+            String password = getProperty( "ADMIN_PASSWORD" );
+            submitAdminData( fullname, mail, password );
+            assertUserLoggedIn( username );
+            submit();
+            clickLinkWithText( "Logout" );
+        }
+    }
+
     public String getUserEmail()
     {
         String email = getProperty( "USERROLE_EMAIL" );
@@ -351,7 +381,7 @@ public abstract class AbstractArchivaTest
     public void checkResourceRoleWithValue( String value )
     {
         assertResourceRolesCheckBoxPresent( value );
-        getSelenium().click( "xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']" );
+            getSelenium().click( "xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']" );
     }
 
 
@@ -688,4 +718,19 @@ public abstract class AbstractArchivaTest
         assertLinkNotPresent( "Logout" );
         assertLinkPresent( "Login" );
     }
+
+    protected void loginAsAdmin()
+    {
+        login( getProperty( "ADMIN_USERNAME" ), getProperty( "ADMIN_PASSWORD" ) );
+    }
+
+    protected void createUserWithRole( String username, String fullname, String email, String password )
+    {
+        createUser( username, fullname, email, password, true );
+        clickLinkWithText( username );
+        clickLinkWithText( "Edit Roles" );
+        checkResourceRoleWithValue( fullname ); 
+
+        clickButtonWithValue( "Submit" );
+    }
 }
index 77dad4db37a49f5916f8123e081b33f295cdd4bc..b751ae022145888e82ff47cde0d41314aaa728e0 100644 (file)
@@ -233,12 +233,16 @@ public abstract class AbstractRepositoryTest
                        clickButtonWithValue( "Add Repository" );
        }
        
-       public void deleteRemoteRepository()
+       public void deleteRemoteRepository( String id, boolean validate )
        {
                goToRepositoriesPage();
-               clickLinkWithXPath( "//div[@id='contentArea']/div/div[8]/div[1]/a[2]" );
+        String xpath = "//div[@id='contentArea']//a[contains(@href,'confirmDeleteRemoteRepository.action?repoid=" + id + "')]";
+        if ( validate || isElementPresent( "xpath=" + xpath ) )
+        {
+            clickLinkWithXPath( xpath );
                assertDeleteRemoteRepositoryPage();
                clickButtonWithValue( "Confirm" );
+        }
        }
        
        public void editRemoteRepository( String fieldName, String value)
@@ -274,12 +278,16 @@ public abstract class AbstractRepositoryTest
                 clickButtonWithValue( "Update Repository" );
         }
        
-       public void deleteManagedRepository()
+       public void deleteManagedRepository( String id, boolean validate )
        {
-               clickLinkWithXPath( "//div[@id='contentArea']/div/div[5]/div[1]/a[2]" );
-               assertPage( "Apache Archiva \\ Admin: Delete Managed Repository" );
-               clickButtonWithValue( "Delete Configuration Only" );
-       }
+        String xpath = "//div[@id='contentArea']//a[contains(@href,'confirmDeleteRepository.action?repoid=" + id + "')]";
+        if ( validate || isElementPresent( "xpath=" + xpath ) )
+        {
+            clickLinkWithXPath( xpath );
+            assertPage( "Apache Archiva \\ Admin: Delete Managed Repository" );
+            clickButtonWithValue( "Delete Configuration Only" );
+        }
+    }
        
        public String getRepositoryDir()
        {
index 884a6efbca304e7eea56590494f3993b36a329bc..a86b126349d64fed55cd0c30d0edaab8791312d0 100644 (file)
@@ -33,6 +33,7 @@ import com.thoughtworks.selenium.DefaultSelenium;
 import com.thoughtworks.selenium.Selenium;
 import org.apache.commons.io.IOUtils;
 import org.testng.Assert;
+import org.testng.annotations.AfterSuite;
 
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
@@ -51,22 +52,18 @@ public abstract class AbstractSeleniumTest {
 
     private final static String PROPERTIES_SEPARATOR = "=";    
 
-    public void open()
-           throws Exception
-       {
-           p = new Properties();
-           p.load( this.getClass().getClassLoader().getResourceAsStream( "testng.properties" ) );
-       
-           //baseUrl = getProperty( "BASE_URL" );
-           maxWaitTimeInMs = System.getProperty( "MAX_WAIT_TIME_IN_MS" );
-       }
-       
        /**
      * Initialize selenium
      */
     public void open( String baseUrl, String browser, String seleniumHost, int seleniumPort )
         throws Exception
     {
+        p = new Properties();
+        p.load( this.getClass().getClassLoader().getResourceAsStream( "testng.properties" ) );
+
+        //baseUrl = getProperty( "BASE_URL" );
+        maxWaitTimeInMs = System.getProperty( "MAX_WAIT_TIME_IN_MS" );
+
         this.baseUrl = baseUrl;
 
         if ( getSelenium() == null )
@@ -80,16 +77,7 @@ public abstract class AbstractSeleniumTest {
 
     public static Selenium getSelenium()
     {
-        if (selenium.get() != null)
-        {
-            return selenium.get();
-        }
-        DefaultSelenium s =
-            new DefaultSelenium( System.getProperty("seleniumHost","localhost"), Integer.getInteger( "seleniumPort",4444), System.getProperty("browser"), baseUrl );
-        s.start();
-        s.setTimeout( maxWaitTimeInMs );
-        selenium.set( s );
-        return selenium.get();
+        return selenium == null ? null : selenium.get();
     }
 
     protected String getProperty( String key )
@@ -126,6 +114,7 @@ public abstract class AbstractSeleniumTest {
            /**
      * Close selenium session. Called from AfterSuite method of sub-class
      */
+    @AfterSuite
     public void close()
         throws Exception
     {
@@ -199,7 +188,7 @@ public abstract class AbstractSeleniumTest {
        
        public void assertImgWithAlt( String alt )
        {
-          assertElementPresent( "/¯img[@alt='" + alt + "']" );
+          assertElementPresent( "//img[@alt='" + alt + "']" );
        }
        
        public void assertImgWithAltAtRowCol( boolean isALink, String alt, int row, int column )
index beb2ab7d05590dfd9cf4ef5389036fdacc47ee2d..9e6f00c1eee76fe126eea602ea7a0bc785621980 100644 (file)
@@ -15,7 +15,7 @@ SELENIUM_BROWSER=*firefox
 SEARCH_BAD_ARTIFACT=asdf
 # Existing Artifact
 ARTIFACT_GROUPID=test
-ARTIFACT_ARTIFACTID=test
+ARTIFACT_ARTIFACTID=testExisting
 ARTIFACT_VERSION=1.0
 ARTIFACT_PACKAGING=jar
 # Reports