Author: lfryc(a)redhat.com
Date: 2010-07-10 16:50:54 -0400 (Sat, 10 Jul 2010)
New Revision: 17872
Modified:
root/tests/metamer/trunk/ftest/src/test/java/org/richfaces/tests/testapp/AbstractTestappTestCase.java
Log:
configuration methods with alwaysRun=true
Modified:
root/tests/metamer/trunk/ftest/src/test/java/org/richfaces/tests/testapp/AbstractTestappTestCase.java
===================================================================
---
root/tests/metamer/trunk/ftest/src/test/java/org/richfaces/tests/testapp/AbstractTestappTestCase.java 2010-07-10
20:50:32 UTC (rev 17871)
+++
root/tests/metamer/trunk/ftest/src/test/java/org/richfaces/tests/testapp/AbstractTestappTestCase.java 2010-07-10
20:50:54 UTC (rev 17872)
@@ -29,6 +29,7 @@
import org.jboss.test.selenium.AbstractTestCase;
import org.jboss.test.selenium.locator.JQueryLocator;
+import org.testng.SkipException;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
@@ -76,7 +77,7 @@
*
* @param urlParams
*/
- @BeforeClass
+ @BeforeClass(alwaysRun = true)
@Parameters({"templates"})
public void initTemplates(@Optional String urlParams) {
if (urlParams == null) {
@@ -98,8 +99,11 @@
* @param templates
* templates that will be used for test, e.g. "red_div"
*/
- @BeforeMethod
+ @BeforeMethod(alwaysRun = true)
public void loadPage(Object[] templates) {
+ if (selenium == null) {
+ new SkipException("selenium isn't initialized");
+ }
String urlParams = "";
if (templates != null && templates.length != 0) {
urlParams = "?templates=" + templates[0];