|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase com.atlassian.confluence.junit3.JUnit3TimingTestCase com.atlassian.confluence.AbstractConfluenceAcceptanceTest
public abstract class AbstractConfluenceAcceptanceTest
This superclass provides Confluence specific functions useful in acceptance tests.
Field Summary | |
---|---|
static java.lang.String |
DASHBOARD_RECENT_UPDATES_URL
|
protected org.slf4j.Logger |
log
|
protected LogAdjuster |
logAdjuster
Can be used by subclasses to turn logging on the server up or down for just one test. |
static RandomnessHandler |
RANDOM
|
protected ConfluenceRpc |
rpc
|
static User |
TEST_ADMIN
|
BlogPost |
TEST_BLOG
|
Comment |
TEST_COMMENT
|
protected static java.lang.String |
TEST_GROUP1
|
protected static java.lang.String |
TEST_GROUP2
|
Page |
TEST_PAGE
|
Space |
TEST_SPACE
|
Space |
TEST_SPACE2
|
static User |
TEST_USER1
|
static User |
TEST_USER2
|
static java.lang.String |
TESTBLOG_CONTENT
|
static java.lang.String |
TESTBLOG_TITLE
|
protected TestData |
testData
|
static java.lang.String |
TESTPAGE_COMMENT
|
static java.lang.String |
TESTPAGE_CONTENT
|
static java.lang.String |
TESTPAGE_TITLE
|
static java.lang.String |
TESTSPACE_KEY
|
static java.lang.String |
TESTSPACE_TITLE
|
static java.lang.String |
TESTSPACE2_KEY
|
static java.lang.String |
TESTSPACE2_TITLE
|
protected net.sourceforge.jwebunit.junit.WebTester |
webTester
|
protected ConfluenceRpc |
wikiMarkupRpc
Use this for tests where you want to create pages/comments/blogs using wikimarkup. |
Constructor Summary | |
---|---|
AbstractConfluenceAcceptanceTest()
|
|
AbstractConfluenceAcceptanceTest(java.lang.String testName)
|
Method Summary | |
---|---|
AdminConsole |
adminConsole()
|
AttachmentsTester |
attachments()
|
void |
createSpaceViaWebUI(Space space)
|
void |
createTestSpaceViaWebUI()
For those times we need to ensure a space was created via the web UI (For example if the web UI may behave differently to RPC) |
static DirectoryConfiguration |
directoryConfig()
|
protected java.lang.String |
generateBaseUrl()
|
java.io.File |
generateFile(java.lang.String filename,
java.lang.String contents)
|
java.lang.String |
getAppContext()
|
java.lang.String |
getBaseUrl()
|
java.lang.String |
getConfiguredBaseUrl()
Returns the configured base URL in the Confluence app. |
protected PluginHelper |
getPluginHelper()
|
protected ServerStateManager |
getServerStateManager()
|
void |
goToBlogCollector(java.lang.String spaceKey)
|
void |
logInAsAdminAtHomepage()
|
void |
loginAsTestUser()
|
void |
loginAsTestUser2()
|
void |
loginAsTestUserAtHomepage()
|
LoginHelper |
logins()
|
void |
logout()
Log out by going straight to the regular logout.action and then starting a new conversation at the start location, usually noop.jsp. |
PageAcceptanceTester |
pages()
|
protected void |
rebuildIndex()
|
protected void |
setUp()
Default setUp method. |
protected void |
setUpTestNG(java.lang.reflect.Method method)
Called by TestNG, calls setUp() on the current class, prevents the need to put this annotation everywhere, and sets the test name properly. |
protected void |
tearDown()
Default tearDown method. |
protected void |
tearDownTestNG()
Called by TestNG, calls tearDown() on the current class, prevents the need to put this annotation everywhere, and sets the test name properly. |
UserManagementHelper |
users()
|
void |
viewHomepage()
|
SpaceAdmin |
viewSpaceAdmin(Space space)
|
SpacePermissions |
viewSpacePermissions(Space space)
|
void |
viewSpaceSummary(java.lang.String spaceKey)
|
void |
viewSpaceTools(java.lang.String spaceKey)
|
void |
viewTrash(java.lang.String spaceKey,
java.lang.String spaceTitle)
|
PagesCollectorBean |
watchSpace(java.lang.String spaceKey)
|
static java.lang.String |
webAppContextPath()
|
Methods inherited from class com.atlassian.confluence.junit3.JUnit3TimingTestCase |
---|
runBare, setExceptionTransformer |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
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, fail, fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final transient org.slf4j.Logger log
protected TestData testData
public static final User TEST_ADMIN
public static final User TEST_USER1
public static final User TEST_USER2
protected static final java.lang.String TEST_GROUP1
protected static final java.lang.String TEST_GROUP2
public Space TEST_SPACE
public Space TEST_SPACE2
public static java.lang.String TESTSPACE_TITLE
public static java.lang.String TESTSPACE_KEY
public static java.lang.String TESTSPACE2_TITLE
public static java.lang.String TESTSPACE2_KEY
public static final java.lang.String TESTPAGE_TITLE
public static final java.lang.String TESTPAGE_CONTENT
public static final java.lang.String TESTPAGE_COMMENT
public static final java.lang.String TESTBLOG_TITLE
public static final java.lang.String TESTBLOG_CONTENT
public Page TEST_PAGE
public BlogPost TEST_BLOG
public Comment TEST_COMMENT
public static final RandomnessHandler RANDOM
protected ConfluenceRpc wikiMarkupRpc
protected ConfluenceRpc rpc
protected LogAdjuster logAdjuster
LogAdjuster.resetLogLevels()
is called in tearDown()
.
public static final java.lang.String DASHBOARD_RECENT_UPDATES_URL
protected net.sourceforge.jwebunit.junit.WebTester webTester
Constructor Detail |
---|
public AbstractConfluenceAcceptanceTest(java.lang.String testName)
public AbstractConfluenceAcceptanceTest()
Method Detail |
---|
public static java.lang.String webAppContextPath()
public static DirectoryConfiguration directoryConfig()
public AttachmentsTester attachments()
public AdminConsole adminConsole()
protected void setUpTestNG(java.lang.reflect.Method method) throws java.lang.Exception
method
- The test method being called
java.lang.Exception
- if setup failsprotected void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
- from superprotected PluginHelper getPluginHelper()
protected void tearDownTestNG() throws java.lang.Exception
java.lang.Exception
- if tear down failsprotected void tearDown() throws java.lang.Exception
filesToDelete
list.
tearDown
in class junit.framework.TestCase
java.lang.Exception
protected java.lang.String generateBaseUrl()
public java.lang.String getConfiguredBaseUrl()
public void logInAsAdminAtHomepage()
public void loginAsTestUser()
public void loginAsTestUserAtHomepage()
public void loginAsTestUser2()
public void logout()
LoginHelper.logOutSlowly()
instead if you're testing what
logging out actually does, and LoginHelper.logout()
if you just want to clean up the session as fast as
possible.
LoginHelper.logout()
,
LoginHelper.logOutSlowly()
public void createSpaceViaWebUI(Space space)
public void createTestSpaceViaWebUI()
public SpaceAdmin viewSpaceAdmin(Space space)
public void goToBlogCollector(java.lang.String spaceKey)
public void viewSpaceSummary(java.lang.String spaceKey)
public SpacePermissions viewSpacePermissions(Space space)
public void viewHomepage()
public void viewTrash(java.lang.String spaceKey, java.lang.String spaceTitle)
public java.lang.String getAppContext()
public void viewSpaceTools(java.lang.String spaceKey)
public PagesCollectorBean watchSpace(java.lang.String spaceKey)
public java.io.File generateFile(java.lang.String filename, java.lang.String contents)
public java.lang.String getBaseUrl()
getConfiguredBaseUrl()
method.protected void rebuildIndex() throws java.lang.InterruptedException
java.lang.InterruptedException
public PageAcceptanceTester pages()
public UserManagementHelper users()
public LoginHelper logins()
protected ServerStateManager getServerStateManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |