enable tests that only work on firefox, conditional on the firefox profile

git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@909354 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2010-02-12 11:02:02 +00:00
parent cf80989a26
commit b5ebb3a6d3
4 changed files with 28 additions and 12 deletions

View File

@ -148,9 +148,21 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<suiteXmlFiles> <properties>
<suiteXmlFile>src/test/testng/config/testng.xml</suiteXmlFile> <!--
</suiteXmlFiles> Use this instead of suiteXmlFiles so that we can add the exclusion, as it is only accepted if you use
the 'all command line parameters' mode.
-->
<property>
<name>suitename</name>
<value>${basedir}/src/test/testng/config/testng.xml</value>
</property>
<property>
<name>excludegroups</name>
<!-- Exclude on all browsers but Firefox, as it is the only one that Selenium supports file uploads on -->
<value>${excluded.groups}</value>
</property>
</properties>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
@ -404,6 +416,7 @@
</activation> </activation>
<properties> <properties>
<selenium.browser>*firefox</selenium.browser> <selenium.browser>*firefox</selenium.browser>
<excluded.groups />
</properties> </properties>
</profile> </profile>
<profile> <profile>
@ -416,6 +429,7 @@
</activation> </activation>
<properties> <properties>
<selenium.browser>*iexplore</selenium.browser> <selenium.browser>*iexplore</selenium.browser>
<excluded.groups>requiresUpload</excluded.groups>
</properties> </properties>
</profile> </profile>
<profile> <profile>
@ -428,6 +442,7 @@
</activation> </activation>
<properties> <properties>
<selenium.browser>*safari</selenium.browser> <selenium.browser>*safari</selenium.browser>
<excluded.groups>requiresUpload</excluded.groups>
</properties> </properties>
</profile> </profile>
<profile> <profile>
@ -440,6 +455,7 @@
</activation> </activation>
<properties> <properties>
<selenium.browser>*custom ${browserPath}</selenium.browser> <selenium.browser>*custom ${browserPath}</selenium.browser>
<excluded.groups>requiresUpload</excluded.groups>
</properties> </properties>
</profile> </profile>
<profile> <profile>

View File

@ -83,7 +83,7 @@ public class ArtifactManagementTest
assertTextPresent( "Please add a file to upload." ); assertTextPresent( "Please add a file to upload." );
} }
@Test( enabled = false ) @Test(groups = "requiresUpload")
public void testAddArtifactValidValues() public void testAddArtifactValidValues()
{ {
// TODO: disable test on non *chrome browsers, there is no way to do file uploads (SEL-63) // TODO: disable test on non *chrome browsers, there is no way to do file uploads (SEL-63)
@ -92,7 +92,7 @@ public class ArtifactManagementTest
} }
//MRM-747 //MRM-747
@Test( enabled = false ) @Test(groups = "requiresUpload")
public void testAddArtifactBlockRedeployments() public void testAddArtifactBlockRedeployments()
{ {
// TODO: disable test on non *chrome browsers, there is no way to do file uploads (SEL-63) // TODO: disable test on non *chrome browsers, there is no way to do file uploads (SEL-63)
@ -100,7 +100,7 @@ public class ArtifactManagementTest
assertTextPresent( "Overwriting released artifacts in repository '" + getRepositoryId() + "' is not allowed." ); assertTextPresent( "Overwriting released artifacts in repository '" + getRepositoryId() + "' is not allowed." );
} }
@Test( enabled = false ) @Test(groups = "requiresUpload")
public void testDeleteArtifact() public void testDeleteArtifact()
{ {
//prep //prep

View File

@ -69,7 +69,7 @@ public class AuditLogsReportTest
// TODO: add test for adding via WebDAV // TODO: add test for adding via WebDAV
// TODO: disable if not running on *chrome // TODO: disable if not running on *chrome
@Test (dependsOnMethods = { "testAddArtifactValidValues" }, enabled = false ) @Test (dependsOnMethods = { "testAddArtifactValidValues" }, groups = "requiresUpload")
public void testViewAuditLogsDataFound() public void testViewAuditLogsDataFound()
{ {
goToAuditLogReports(); goToAuditLogReports();
@ -90,7 +90,7 @@ public class AuditLogsReportTest
// TODO: add test for adding via WebDAV // TODO: add test for adding via WebDAV
// TODO: disable if not running on *chrome // TODO: disable if not running on *chrome
@Test (dependsOnMethods = { "testAddArtifactValidValues" }, enabled = false ) @Test (dependsOnMethods = { "testAddArtifactValidValues" }, groups = "requiresUpload")
public void testViewAuditLogsOnlyArtifactIdIsSpecified() public void testViewAuditLogsOnlyArtifactIdIsSpecified()
{ {
goToAuditLogReports(); goToAuditLogReports();
@ -111,7 +111,7 @@ public class AuditLogsReportTest
// TODO: add test for adding via WebDAV // TODO: add test for adding via WebDAV
// TODO: disable if not running on *chrome // TODO: disable if not running on *chrome
@Test (dependsOnMethods = { "testAddArtifactValidValues" }, enabled = false ) @Test (dependsOnMethods = { "testAddArtifactValidValues" }, groups = "requiresUpload")
public void testViewAuditLogsForAllRepositories() public void testViewAuditLogsForAllRepositories()
{ {
goToAuditLogReports(); goToAuditLogReports();
@ -129,7 +129,7 @@ public class AuditLogsReportTest
assertTextPresent( "admin" ); assertTextPresent( "admin" );
} }
@Test (dependsOnMethods = { "testAddArtifactValidValues", "testUserWithRepoManagerInternalRole" }, enabled = false ) @Test (dependsOnMethods = { "testAddArtifactValidValues", "testUserWithRepoManagerInternalRole" }, groups = "requiresUpload")
public void testViewAuditLogsViewAuditEventsForManageableRepositoriesOnly() public void testViewAuditLogsViewAuditEventsForManageableRepositoriesOnly()
{ {
String groupId = getProperty( "SNAPSHOT_GROUPID" ); String groupId = getProperty( "SNAPSHOT_GROUPID" );

View File

@ -45,7 +45,7 @@ public class BrowseTest
} }
// MRM-1278 // MRM-1278
@Test( enabled = false ) @Test(groups = {"requiresUpload"})
public void testCorrectRepositoryInBrowse() public void testCorrectRepositoryInBrowse()
{ {
File artifact = File artifact =