diff --git a/pom.xml b/pom.xml index 7f81e9d4a767f8051874fed0fa4ed39184c22c13..1d4a23802a97da430ec8c974fbcab85b164863b0 100644 --- a/pom.xml +++ b/pom.xml @@ -21,34 +21,6 @@ - - junit - junit - 4.11 - test - - - - commons-dbcp - commons-dbcp - 1.4 - test - - - - org.seleniumhq.selenium - selenium-java - 2.39.0 - test - - - - org.springframework - spring-test - 4.0.0.RELEASE - test - - org.glassfish.jersey.test-framework.providers jersey-test-framework-provider-grizzly2 @@ -79,6 +51,35 @@ commons-codec 1.9 + + + + junit + junit + 4.11 + test + + + + commons-dbcp + commons-dbcp + 1.4 + test + + + + org.seleniumhq.selenium + selenium-java + 2.39.0 + test + + + + org.springframework + spring-test + 4.0.0.RELEASE + test + @@ -93,6 +94,35 @@ DAAExample + + maven-antrun-plugin + + + test-reports + test + + + + + + + + + + + + run + + + + + + ant + ant-junit + 1.6.2 + + + diff --git a/src/test/java/es/uvigo/esei/daa/web/PeopleWebTest.java b/src/test/java/es/uvigo/esei/daa/web/PeopleWebTest.java index bac7492fe909e8c85c004f96736f3f66fefc0cfe..c757d703eb5183bc461ab9b32c215c1b7d361a6b 100644 --- a/src/test/java/es/uvigo/esei/daa/web/PeopleWebTest.java +++ b/src/test/java/es/uvigo/esei/daa/web/PeopleWebTest.java @@ -21,7 +21,6 @@ import es.uvigo.esei.daa.TestUtils; public class PeopleWebTest { private static final int DEFAULT_WAIT_TIME = 1; private WebDriver driver; - private String baseUrl; private StringBuffer verificationErrors = new StringBuffer(); @BeforeClass @@ -33,13 +32,12 @@ public class PeopleWebTest { public void setUp() throws Exception { TestUtils.initTestDatabase(); + final String baseUrl = "http://localhost:9080/DAAExample/"; + driver = new FirefoxDriver(); - baseUrl = "http://localhost:9080/DAAExample/"; - driver.get(baseUrl); - driver.manage().addCookie( - new Cookie("token", "bXJqYXRvOm1yamF0bw==") - ); + driver.manage().addCookie(new Cookie("token", "bXJqYXRvOm1yamF0bw==")); + // Driver will wait DEFAULT_WAIT_TIME if it doesn't find and element. driver.manage().timeouts().implicitlyWait(DEFAULT_WAIT_TIME, TimeUnit.SECONDS);