Class AbstractHtmlUnitScriptTestCase
java.lang.Object
com.xceptance.xlt.api.tests.AbstractTestCase
com.xceptance.xlt.api.engine.scripting.AbstractHtmlUnitScriptTestCase
Base class of all scripted tests that use the Action-based API.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.AbstractHtmlUnitScriptTestCase
(String baseUrl) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Performs additional cleanup tasks for HtmlUnit/action-based exported script test cases.final void
Performs additional setup tasks for HtmlUnit/action-based exported script test cases.protected boolean
evaluatesToTrue
(String jsExpression) Returns whether or not the given expression evaluates totrue
.protected String
Resolves the given string.protected String
resolveKey
(String key) Resolves the given test data key.Methods inherited from class com.xceptance.xlt.api.tests.AbstractTestCase
__setup, __tearDown, getEffectiveKey, getProperty, getProperty, getProperty, getProperty, getSimpleName, getTestDataSet, getTestName, reconfigureStartUrl, setTestDataSet, setTestName, setTestName, setUp, tearDown
-
Constructor Details
-
AbstractHtmlUnitScriptTestCase
Constructor.- Parameters:
baseUrl
- the base URL to use for resolution of relative URLs
-
AbstractHtmlUnitScriptTestCase
public AbstractHtmlUnitScriptTestCase()Default constructor.
-
-
Method Details
-
__setUpAbstractHtmlUnitScriptTestCase
public final void __setUpAbstractHtmlUnitScriptTestCase()Performs additional setup tasks for HtmlUnit/action-based exported script test cases. Don't call this method directly, it will be called implicitly by the JUnit framework. -
__cleanUpAbstractHtmlUnitScriptTestCase
public final void __cleanUpAbstractHtmlUnitScriptTestCase()Performs additional cleanup tasks for HtmlUnit/action-based exported script test cases. Don't call this method directly, it will be called implicitly by the JUnit framework. -
resolve
Resolves the given string.- Parameters:
resolvable
- the string to be resolved- Returns:
- the resolved string
-
resolveKey
Resolves the given test data key.- Parameters:
key
- the key string containing only the name of a test data field- Returns:
- resolved string or
null
if not found
-
evaluatesToTrue
Returns whether or not the given expression evaluates totrue
.- Parameters:
jsExpression
- the JavaScript expression to evaluate- Returns:
true
if and only if the given JavaScript expression is not blank and evaluates totrue
-