public class JellyTestCase extends NbTestCase
Modifier and Type | Field and Description |
---|---|
boolean |
captureScreen
screen capture feature in case of failure is enabled by default
|
boolean |
closeAllModal
closing all modal dialogs after each test case is disabled by default
|
boolean |
dumpScreen
screen XML dump feature in case of failure is disabled by default
|
boolean |
waitNoEvent
Wait 1000 ms before every test case
|
Constructor and Description |
---|
JellyTestCase(String testName)
constructor required by JUnit
|
Modifier and Type | Method and Description |
---|---|
protected void |
clearTestStatus()
Clears test status (used when test does not depend on previous test)
|
static void |
closeAllModal()
Closes all opened modal dialogs.
|
void |
closeOpenedProjects()
Close projects opened by openProjects(String ...) or openDataProjects(String ...)
|
void |
closeOpenedProjects(Object... projects)
Close projects opened by openProjects(String ...) or openDataProjects(String ...)
|
protected static junit.framework.Test |
createModuleTest(Class testClass,
String... testNames) |
protected static junit.framework.Test |
createModuleTest(String modules,
String clusters,
Class testClass,
String... testNames) |
static NbModuleSuite.Configuration |
emptyConfiguration()
Returns empty configuration with all clusters and modules enabled and
with default recommended settings.
|
protected void |
endTest()
Sets the test status to 'finished' state (test passed)
|
void |
fail(Throwable t)
Finishes test with status Fail
|
protected void |
failNotify(Throwable reason)
Method called in case of fail or error just after screen shot and XML dumps.
|
protected void |
initEnvironment()
Inits environment before test case is executed.
|
void |
openDataProjects(String... projects)
Open projects located within
NbTestCase.getDataDir(); |
void |
openProjects(String... projects)
Open projects.
|
void |
runBare()
Overridden method from JUnit framework execution to perform conditional
screen shot and conversion from TimeoutExpiredException to AssertionFailedError.
|
protected void |
runTest()
Ensures that screen capture is done before the tearDown() is called
|
protected void |
startTest()
Checks whether previous test finished correctly and
sets test status to 'not finished' state
|
void |
waitScanFinished()
Waits for the source scanning to be finished.
|
assertFile, assertFile, assertFile, assertFile, assertFile, assertFile, assertFile, assertFile, assertFile, assertFile, assertGC, assertGC, assertSize, assertSize, assertSize, assertSize, canRun, clearWorkDir, compareReferenceFiles, compareReferenceFiles, convertNBFSURL, failByBug, failByBug, getDataDir, getExpectedFail, getGoldenFile, getGoldenFile, getLog, getLog, getRef, getTestNumber, getWorkDir, getWorkDirPath, log, log, logLevel, logRoot, ref, run, runInEQ, setFilter, timeOut
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, setName, setUp, tearDown, toString
public boolean captureScreen
public boolean dumpScreen
public boolean closeAllModal
public boolean waitNoEvent
public JellyTestCase(String testName)
testName
- method name to be used as testcaseprotected void initEnvironment()
public void runBare() throws Throwable
runBare
in class NbTestCase
Throwable
- Throwableprotected void runTest() throws Throwable
runTest
in class junit.framework.TestCase
Throwable
protected void failNotify(Throwable reason)
reason
- Throwable reason of current failpublic static void closeAllModal()
public void fail(Throwable t)
t
- Throwable reason of test failureprotected void startTest()
protected void endTest()
protected void clearTestStatus()
public void waitScanFinished()
junit.framework.AssertionFailedError
- if scanning was canceled or other exception appearspublic void openProjects(String... projects) throws IOException
projects
- - paths to the project directories.IOException
public void openDataProjects(String... projects) throws IOException
NbTestCase.getDataDir();
projects
- - relative to dataDir (test/qa-functional/data) path names.IOException
public void closeOpenedProjects()
public void closeOpenedProjects(Object... projects)
protected static junit.framework.Test createModuleTest(String modules, String clusters, Class testClass, String... testNames)
protected static junit.framework.Test createModuleTest(Class testClass, String... testNames)
public static NbModuleSuite.Configuration emptyConfiguration()